OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 14 Jun 2005, 12:30:12
-
i have a trigger covering the map, east present, on activation
all_east = thislist
fine. then in the init.sqs file i have the lines
{_x setskill 1} foreach list all_east
{_x setface "enemy"} foreach list all_east
the second line is just to check the first is actually working. the second isn't - the loons' faces are all different. if i manually put the setface command into a loon's init field, fine, it works, so it's not the face.
what's wrong with the syntax above?
-
Remove the list command in your code.
{_x setskill 1} foreach all_east
Only when you name your trigger in the namefield you have to use the list command.
Also put a 1-5 sec delay in the beginning, the trigger needs a short time to store all units.
-
hmmm, well the syntax is now correct - cheers ;) - but it still won't activate from the init.sqs file. i stuck it in the trigger itself and it works no problem, so i think i'll leave it there for the time being.
thanks again.
edit - heh, that's what it was - not enough time - i've put a pause into the init file, and presto, about 3 seconds in, everyone has the right face.
problem solved ;)
-
problem solved
Do it. :)