OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Koveras on 25 Apr 2003, 23:11:53

Title: commands
Post by: Koveras on 25 Apr 2003, 23:11:53
how can i order a unit of a group to enter in a jeep alone? like the mission in OFP where the commander says to Armstrong to get in the truck? i think it is something like
 unitname commandMove getPos POS

do you know? thanks :D
Title: Re:commands
Post by: _hammy_ on 25 Apr 2003, 23:35:17
to put a dude in a vehicle
put this in the dude's init field

this moveincargo jeep1

you can also use:
this moveincommander jeep1
this moveingunner jeep1
this moveindriver jeep1
Title: Re:commands
Post by: jojojoni on 25 Apr 2003, 23:49:13
In their initÂ's field, write this:

unitname1 assignasdriver vehiclename
unitname2 assignascargo vehiclename
...

At any waypoint (on activation field), trigger (on activation or on deactivation fields) or script, type this:

"_x ordergetin TRUE" foreach units groupname
Title: Re:commands
Post by: Sui on 26 Apr 2003, 04:17:53
"_x ordergetin TRUE" foreach units groupname

That's the right idea jojojoni, the syntax is slightly wrong though ;)

Try:

(units groupname) ordergetin true

The ordergetin command needs an array of units (which is what units groupname is. So to use it on a whole group, you don't need a foreach command. ;)
To use it on just one unit, the command would be:

[ unit ] ordergetin true

Notice the [ ]. It still has to be an array, even if there is only one unit in that array