OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 2nd Ranger on 17 Dec 2004, 20:55:30
-
Scenario;
At the start of the mission, three Humvees form a convoy. Two squads board two of the humvees and join the leader, who is now in command of the lead hummer.
The lead vehicle drives for a while until it hits a bomb (triggered). The other two humvees are then supposed to unload the troops.
The problem was that the humvees would ignore their own waypoints and just go to the lead hummer's waypoint, so I stopped them doing that by adding them to GrpNull when the bomb goes off, then giving them both a DoMove to a certain position.
I want the soldiers to get out of their vehicles when they reach these new positions, without typing the unassignvehicle command over and over. Is there a way I can do this? Perhaps I am missing something blindingly obvious, but I'd appreciate any help offered.
Thanks.
-
can't you just make the waypoint an unload waypoint?
-
You could indeed do it by waypoints. You may need to rethink your groups slightly to make it work.
If you are not familiar with switch triggers there is a switch trigger tutorial in the Ed Depot which may help.
To issue a command to a whole bunch of units at once use the forEach command.
"unAssignVehicle _x" forEach Y
where Y could be for example
units grp1
or
[loon1, loon2]
Syntax not guaranteed.