Page 1 of 1

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

Posted: Tue Aug 05, 2003 5:12 am
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?

Posted: Tue Aug 05, 2003 8:59 pm
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