|
|
| (14 intermediate revisions by 4 users not shown) |
| Line 1: |
Line 1: |
| == Introduction ==
| | #REDIRECT [[Operation Flashpoint: Actions]] |
| | |
| Actions are normally initiated by the player using the action menu. The script command [[action]] allows actions to be performed by any unit. For example, the command "player action ["WEAPONONBACK"]" has the same effect as choosing "M16 on back" in the menu. New actions can be defined using [[addAction]].
| |
| | |
| == Syntax ==
| |
| | |
| Syntax: '''unit action ["actionname"]''', where
| |
| * unit = [[Object]]: pointer to the unit that should perform this action
| |
| * actionname = [[String]]: name of action to be performed
| |
| | |
| Capitalization for the commands doesn't matter (i.e. player action ["DROP WEAPON",box,1,1,"AK74"] is the same as player action ["drop weapon",box,1,1,"ak74"])
| |
| | |
| == AUTOHOVER ==
| |
| '''helicopter1 action ["AUTOHOVER"]'''
| |
| | |
| Toggles hovering on and off. (Only works if player is pilot)
| |
| | |
| <code>ChopperOne action ["AUTOHOVER"]</code>
| |
| | |
| | |
| == CANCEL LAND ==
| |
| '''plane1 action ["CANCEL LAND"]'''
| |
| | |
| Cancel autopilot landing for 'plane1'.
| |
| | |
| <code>PlaneOne action ["CANCEL LAND"]</code>
| |
| | |
| | |
| == DEACTIVATE ==
| |
| '''unit1 action ["DEACTIVATE",unit2,0,0,"PIPEBOMB"]'''
| |
| | |
| Soldier 'unit1' will deactivate a satchel charge that has been placed by unit2.<br>
| |
| This happens from a distance (i.e. unit1 will not walk up to the charge to deactivate it, but do it 'remotely').<br>
| |
| If unit2 is nearby the charge when it is being deactivated it will end up back in its inventory.
| |
| | |
| <code>SoldierOne action ["DEACTIVATE",player,0,0,"PIPEBOMB"]</code>
| |
| | |
| | |
| == DROP WEAPON / MAGAZINE ==
| |
| '''unit1 action ["DROP MAGAZINE",container,1,1,"MAGAZINENAME"]'''<br>
| |
| '''unit1 action ["DROP WEAPON",container,1,1,"WEAPONNAME"]'''
| |
| | |
| Soldier 'unit1' will put a magazine or weapon ([[:Category: Weapons|see list]]) into weaponsholder 'container' (ammo box, car, etc.). If container is nothing or an non-existant object, the magazine or weapon will be dropped at the unit's feet.
| |
| | |
| <code>SoldierOne action ["DROP MAGAZINE",CarOne,1,1,"AK74"]
| |
| SoldierOne action ["DROP WEAPON","",1,1,"AK74"]</code>
| |
| | |
| | |
| == EJECT ==
| |
| '''unit1 action ["EJECT",vehicle1]'''
| |
| | |
| Soldier 'unit1' will jump out of 'vehicle1'. (Via parachute in case of planes
| |