Assuming it works... arrays don't behave themselves very often
Hmm, I've never had problems with arrays. I use them a lot. You do have to watch out when you assign one array to equal another, ie thisarray=thatarray. Both arrays point to the same memory!! Changing the contents of either one changes both. You have to use the + operator when assigning arrays: thisarray=+thatarray. That makes two independent copies. (Just in case you didn't know all that
)
Please just tell me what I need to put in the trigger's init line!
A trigger does not have an init line. What you want is this type of trigger:
activation: civilian, present
condition: this
on activation: {_x Switchmove "FXStandsuruniv"} foreach thislist
Even if you use a repeating trigger, it will not retrigger until whatever caused it to activate is removed from the trigger area. It has to de-activate before it can re-activate (or repeat). So, as soon as the first civilian enters, he will be the only one to surrender, even if others enter the trigger zone. One way to get around this is to setpos the trigger somewhere else, wait 1 second and then setpos it back. Use a small script:
;movetrigger.sqs
_trig=_this select 0
_pos=getpos _trig
_trig setpos [0,0,0]
~1
_trig setpos _pos
exit
So name the trigger
civytrigger (make it repeating) and put this in the on-activation field:
{_x Switchmove "FXStandsuruniv"} foreach thislist;[civytrigger] exec "movetrigger.sqs"The 1 second delay gives it time to de-activate.