OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pos on 11 Nov 2005, 23:00:33
-
I have a about 6 groups of 8 men in a square formations dotted around a large town area, to keep them in position I've used the dostop command. Then when a trigger is activated they return to the group and move to a waypoint, and I use a command line something like this (<unit> domove getmakrertype "maker"), however at the moment I have to do this command line for every unit in the group in the trigger init field and its very time consuming.
The other problem I have is once they return to the group and begin to move to the waypoint some groups just ignore the waypoint and run off behind some buildings.
So if anyone has any ideas or tutorials/scripts to firstly make an easier way to cancel the dostop command for a group. And secondly is there any way to fix the waypoint problem?
Thx for any help.
Pos
-
doMove does indeed need to be applied to each unit. I don't know what you mean about it being time consuming. Each instruction will take only a small fraction of a second. The command can be written simply for a group of soldiers as follows:
{_x domove getmarkerPos "marker"} forEach units grpname
or if you have them in a trigger area:
{_x domove getmarkerPos "marker"} forEach thislist
The other problem I have is once they return to the group and begin to move to the waypoint some groups just ignore the waypoint and run off behind some buildings.
Learn to live with it. Trying to make the loons do exactly what you want is the road to madness.
-
ah thanks for the domove command, I was doing it like "unit1 domove getmarkerpos "maker"; unit2 domove getmaerk.....; unit3 domove and so on....
I guess i'll have to work around the other problem ;/
thanks anyway
-
doFollow might help. And try moving the waypoint a little.
Waypoints and triggers reward a little experimentation. Some of the lesser members of the scripting community despise them, to their discredit, but they are very powerful once you get to grips with them. In other words play with the waypoint position.
Make sure you understand the forEach command in THobson's example. Jolly powerful.