turning spawing enemy's off and on again???

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
williewisp
First Lieutenant
Posts: 208
Joined: Fri May 16, 2003 1:10 pm
Location: ireland

turning spawing enemy's off and on again???

Post by williewisp »

i was trying out the tut on spawing an enemy in your map, i was wondering if it was posible to turn the triggers off (only 1's that you wanted) and on as needed.

eg.
trigger outside a room,
the trigger is turned off,
go into the room,
trigger is not set off,
collect, documents,
trigger is turned on,
walk through trigger,
enemy appears.

i know you can do it other triggers, using nottriggerable but, there is already a targetname which is the same as the rest, the only unique thing is the #set value.

any ideas any1?
it's not a time for thinking its a time for drinking!
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

if it has a unique #set, you can try this:

Code: Select all

for (local.i = 1; local.i <= $mytrigger.size; local.i++) //.size is how many exist
{
    local.trig = $mytrigger[local.i] //so this would start with first trigger spawned, then 2nd then 3rd, etc has NOTHING to do with #sets
    if (local.trig.set == 3) //if the trigger your looking for has a #set of 3
    {
        local.trig nottriggerable
    }
}
end
POOF
Post Reply