OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 19 Oct 2005, 21:44:55
-
i am making a script which creates units using the (surprise surprise) createunit command. in the init string part i tried putting 'dostop this'.
loon won't stop.
i tried putting a trigger together in-game, same createunit command, giving loon a name, then after he was created, dostopping him by name. no problem. loon stops.
i tried recreating this in a script by assigning a random name to the loon, then after he was created, dostopping him by that name.
loon still won't stop.
what gives?
-
It could be another command overriding it ... say a return to formation from a group leader. Or maybe if he has a waypoint.
Or it could be that it takes loons a second or two to wake up after createunit, and the command is being issued when he is still asleep. Try issuing it a few seconds later.
-
In addition: when you create a unit you have to have it assigned to a group - it may be trying to get to its group leader. try: [this] join grpNull
-
hint: create a group in the editor and place 'dostop this' in the init field of each unit. What will you see ? :)
Posible solutions :
-use disableAi command to stop anf enableAI function to let soldiers move.
-use dostop loop
-unassign all soldiers from its groups (not recommend )
-
int: create a group in the editor and place 'dostop this' in the init field of each unit. What will you see ?
Posible solutions :
-use disableAi command to stop anf enableAI function to let soldiers move.
There is no enableAI command...
-
there's _function_ ;) not command
-
thanks all. i've worked around the problem, and have fixed it simply - always the best way ;)