OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Teifiterror on 22 May 2003, 19:45:23
-
I am trying to get a group of men to retreat and board a chopper in another location. I need a command that will make all of the men in the group board the chopper and not care where their leader is.
Teifiterror
-
You could place a waypoint "get in" for your group on the chopper, when you have reached the point where you want them to do just that, you simply select them all and command them to go to the next waypoint ;)
Select all (standard is: ~) then 1 (move) then 9 (next waypoint)
maybe that's what you're looking for?
-
I need a command i cant use waypoints in the mission as it is much to complicated. I need a basic command no waypoints.
Teifiterror
-
unitname MoveInCargo vechilename
I would activate it by a trigger because they will hop right in so for looks make sure you have it at the right spot.
-
No that is imediate. I need a command that makes them run to the chopper and then get in.
Teifiterror
-
Then it is waypoints you must use... sorry.
Maybe someone can create a script if that is possible ???
-
What is the command to get units to move to a particualr waypoint? I could use that then make them get into the chopper to make it more realistic.
Teifiterror
-
Why can you not use waypoints.... I think that is the confusion we are seeing?
-
You can still command your units when they move to the chopper by waypoint. You simply select them and click anywhere on the map to make them move... basic ofp stuff... you can allways make the mission more complicated, adding more wp's after the "get in" wp does not mean they immediately move on to the next wp... they will only do that when you command them to
-
Description :
Orders a unit to get into it s assigned vehicle.
Syntax :
unitNameArray OrderGetIn true
unitNameArray is an array of Unit names you want to order to get into their assigned vehicles.
Returns :
N/A
Example :
[homer,marge,bart,lisa,maggie] ordergetin true
Notes:
Before you can do this you must first assign the units to vehicles using one of the assign commands.
CommandMove
Description :
Causes leader of units to order selected units to move to specified coordinates.
Syntax :
UnitName CommandMove Coordinates
-or-
UnitArray CommandMove Coordinates
UnitName is the name of the unit to receive the move order.
UnitArray is an array of units to receive the move order.
Coordinates is the x,y,z coordinates of the position to be moved to.
Returns :
N/A
Example :
Soldier1 CommandMove [1000,1000]
[Soldier1, Soldier2] CommandMove GetMarkerPos "Marker1"
Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2,unit3,unit4] CommandMove [10,30], only unit1 and unit2 will receive the move command. If the group leader is included in the nit array, only he will receive the move command and will move to ordered postion. The others may follow him if they are in formation, but if the leader is killed, a new leader will be assigned who will attempt to continue following waypoints, or if no more waypoints are defined, move back to last waypoint.
-
I think that could help you....
-
Here is a (homemade) script that I've found convenient in many cases :
;name of group
_group=_this select 0
;name of chopper
_chopper=_this select 1
_chopper flyinheight 2.5
_chopper lockwp true
_number=(count units _group)-1
@ unitready _chopper
_i=0
#loop
_man=units _group select _i
[_man] ordergetin true
_i=_i+1
?_i>_number:_chopper lockwp false;_chopper flyinheight 75;exit
~1
goto "loop"
Best way to use it : use the assignascargo for each unit you want to see get in.
Type : [_mygroup, _mychopper] exec "embark.sqs" in the activation field of a WP of your chopper (the type of your WP doesn't matter, that's what's cool ;D), and that's it !!!
P.S : and if you want the units to get in the chopper, replace true by false in the script ;)