Ceeeb/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 263: Line 263:


<code>SoldierOne action ["SALUTE", SoldierOne]</code>
<code>SoldierOne action ["SALUTE", SoldierOne]</code>
'''unit2 action ["SALUTE", unit1] - makes unit1 salute. If in safe or careless mode, salute will be held, otherwise it is only momentary.




Line 274: Line 276:


<code>ScudOne action ["SCUD START"]</code>
<code>ScudOne action ["SCUD START"]</code>
 
No scud in ArmA.


== SETTIMER ==
== SETTIMER ==
Line 283: Line 285:


<code>SoldierOne action ["SETTIMER"]</code>
<code>SoldierOne action ["SETTIMER"]</code>
unit2 action ["SETTIMER",unit1,<bombName>] - adds 30 seconds to the <bombName> countdown. unit1 and unit 2 need not have anything to do with the timebomb, nor be anywhere near it. bombname = nearestObject [bombSettingUnit,"timebomb"].




Line 352: Line 355:
'''unitname action ["TOUCHOFF", unitname]'''
'''unitname action ["TOUCHOFF", unitname]'''


Soldier 'unitname' touches off satchel charge.
Soldier 'unitname' touches off satchel charge.
 
unit2 action ["TOUCHOFF", unit1] - unit1 does not have to do the action.


<code>unitname action ["TOUCHOFF", unitname]</code>
<code>unitname action ["TOUCHOFF", unitname]</code>
Line 364: Line 369:
<code>TankOne action ["TURNIN", TankOne]</code>
<code>TankOne action ["TURNIN", TankOne]</code>


AI vehicles seem to want to immediately turn in.


== USEMAGAZINE ==
== USEMAGAZINE ==
Line 393: Line 399:
'''unitname action ["WEAPONONBACK"]'''
'''unitname action ["WEAPONONBACK"]'''


Soldier 'unitname' takes weapon from/to back.<br>
gameLogic action ["WEAPONonBack",unit1] - unit1 raises rifle. Assume animations are missing.
Change is persistent with player, but AI units will switch back if their [[setBehaviour|behaviour mode]] is incompatible (SAFE or CARELESS with WEAPONINHAND, and STEALTH, COMBAT &amp; AWARE with WEAPONONBACK).
 
<code>SoldierOne action ["WEAPONONBACK"]</code>





Revision as of 08:42, 16 April 2007

CEEEB VS ACTIONS

gameLogic = a gamelogic. It seems any unit may initialize the action, irrespective of which unit it to feel the effects. player = soldier.

Syntax

Parameters of scripting function 'action':

<object> action [<type>]
<object> action [<type>, <target>]
<object> action [<type>, <target>, additional parameters]
  • unit = Object: pointer to the unit that should perform this action (if vehicle is given, its commander is used)
  • type = String: name of action type - see below
  • target = Object: target object


AUTOHOVER

helicoptername action ["AUTOHOVER", helicoptername]

Toggles hovering on and off. (Only works if player is pilot)

ChopperOne action ["AUTOHOVER", ChopperOne]


CANCELACTION

["CANCELACTION", <target>]


CANCELLAND

planename action ["CANCELLAND", planename]

Cancel autopilot landing for 'planename'.

PlaneOne action ["CANCELLAND", PlaneOne]


CANCELTAKEFLAG

["CANCELTAKEFLAG", <target>]


DEACTIVATE

unitname action ["DEACTIVATE", unit2, 0, 0, "PIPEBOMB"]

Soldier 'unitname' will deactivate a satchel charge that has been placed by unitname2.
This happens from a distance (i.e. unitname will not walk up to the charge to deactivate it, but do it 'remotely').
If unitname2 is nearby the charge when it is being deactivated it will end up back in its inventory.

SoldierOne action ["DEACTIVATE", player, 0, 0, "PIPEBOMB"]


DEACTIVATEMINE

["DEACTIVATEMINE", <target>]


DIARY

["DIARY", <target>]


DROPWEAPON / DROPMAGAZINE

unitname action ["DROPMAGAZINE", (vehiclename or unitname) ,"MAGAZINENAME"]
unitname action ["DROPWEAPON", (vehiclename or unitname) ,"WEAPONNAME"] ...drops weapon and ammo

Soldier 'unitname' will put a magazine or weapon (see list) on the ground (Weaponholder) or into named vehicle (ammo box, car, etc.).

SoldierOne action ["DROPMAGAZINE", CarOne, "AK74"]


EJECT

unitname action ["EJECT", vehiclename]

Soldier 'unitname' will jump out of 'vehiclename'. (Via parachute in case of planes & helicopters.)

SoldierOne action ["EJECT", ChopperOne]


ENGINEON / ENGINEOFF

unitname action ["ENGINEON", vehiclename]
unitname action ["ENGINEOFF", vehicle1name]

Soldier 'unitname' will turn engine of 'vehiclename' either on or off.
Engine will only stay on in vehicles like carshelicopters or planes. In cars the engine will be shut off again right away.

SoldierOne action ["ENGINEON", ChopperOne]


FIREINFLAME / FIREPUTDOWN

unitname action ["FIREINFLAME", firename]
unitname action ["FIREPUTDOWN", firename]

Soldier 'unitname' will ignite ("FIREINFLAME") or extinguish ("FIREPUTDOWN") fireplace 'firename'.

SoldierOne action ["FIREINFLAME", Fire1]


FLAPSUP / FLAPSDOWN

["FLAPSUP", <target>]
["FLAPSDOWN", <target>]


GETINCOMMANDER / GETINDRIVER/ GETINGUNNER / GETINCARGO / GETINPILOT

unitname action ["GETINCOMMANDER", vehiclename]
unitname action ["GETINDRIVER", vehiclename]
unitname action ["GETINGUNNER", vehiclename]
unitname action ["GETINCARGO", vehiclename]
unitname action ["GETINPILOT", vehiclename]

Soldier 'unitname' will be teleported next to 'vehiclename', play the entering animation, and then be assigned as either commander, driver or gunner.

SoldierOne action ["GETINCOMMANDER", CarOne]


GETOUT

unitname action ["GETOUT", vehiclename]

Soldier 'unitname' will jump out of 'vehiclename'. (No parachute in case of planes & helicopters.)

SoldierOne action ["GETOUT", ChopperOne]


HANDGUNON / HANDGUNOFF

unitname action ["HANDGUNOFF", unitname]
unitname action ["HANDGUNON", unitname]

Soldier 'unitname' will switch to primary ("handgun off") or secondary ("handgun on") weapon.

SoldierOne action ["HANDGUNON", SoldierOne]


HEAL

unitname action ["HEAL", unitname2]

Medic 'unitname2' will teleport to 'unitname' and heal him.

SoldierOne action ["HEAL", MedicOne]


HIDEBODY

unitname action ["HIDEBODY", bodyname2]

Soldier 'unitname' will hide (bury) 'unitname2'.

SoldierOne action ["HIDEBODY", SoldierTwo]


INGAMEMENU

["INGAMEMENU", <target>]


LADDERDOWN / LADDERUP

unitname action ["LADDERDOWN", building1]
unitname action ["LADDERDOWN", object ID]
unitname action ["LADDERUP", building1]
unitname action ["LADDERUP", object ID]

Soldier 'unitname' will either climb up or down the ladder of a building that's either defined via name or object ID.

SoldierOne action ["ladderup",object 123456]


LADDEROFF

["LADDEROFF", <target>, <ladder index>]


LADDERONUP / LADDERONDOWN

["LADDERONUP", <target>, <ladder index>, <ladder position>]
["LADDERONDOWN", <target>, <ladder index>, <ladder position>]


LAND

["LAND", <target>]


LANDGEAR

planename action ["LANDGEAR", planename]

Toggle landing gear on 'planename'.
Only works if player is pilot.

PlaneOne action ["LANDGEAR", PlaneOne]


LIGHTOFF / LIGHTON

vehiclename action ["LIGHTON", vehiclename]
vehiclename action ["LIGHTOFF", vehiclename]

Turns lights of 'vehiclename' either on or off.
The lights will not stay on unless the driver is in SAFE or CARELESS mode.
The lights will not stay off if the driver is in SAFE or CARELESS mode.


driver CarOne setBehaviour "safe";
CarOne action ["LIGHTON", CarOne];

LOADMAGAZINE

["LOADMAGAZINE", <target>, <magazine creator>, <magazine id>, <weapon name>, <muzzle name>]


MANUALFIRE

tankname action ["MANUALFIRE"]

Toggles manual fire mode if player is driver of vehicle.

TankOne action ["MANUALFIRE"]


MARKENTITY

["MarkEntity", <target>]


MOVETOCARGO / MOVETOCOMMANDER / MOVETODRIVER / MOVETOGUNNER / MOVETOPILOT

unitname action ["MOVETOCARGO", vehiclename]
unitname action ["MOVETOCOMMANDER", vehiclename]
unitname action ["MOVETODRIVER", vehiclename]
unitname action ["MOVETOGUNNER", vehiclename]
unitname action ["MOVETOPILOT", vehiclename]

Moves 'unitname' into cargo, commander, driver or gunner position.
If that position was occupied before, the units will swap places.

SoldierOne action ["MOVETODRIVER", CarOne]


NONE

["NONE", <target>]


NVGOGGLES / NVGOGGLESOFF

unitname action ["NVGOGGLES", unitname]
unitname action ["NVGOGGLESOFF", unitname]


Switch night vision goggles on/off for player.

player action ["NVGOGGLES"]


REARM / REFUEL / REPAIR

vehiclename action ["REARM", vehiclename2] vehiclename action ["REFUEL", vehiclename2] vehiclename action ["REPAIR", vehiclename2]

Vehiclename will receive weapons/fuel/repair from 'vehicle2' immediately and via teleportation.

SoldierOne action ["REARM", TruckOne]


RETURNFLAG

unitname action ["RETURNFLAG", flagname]

Soldier 'unitname' returns 'flagname' to base.

SoldierOne action ["RETURNFLAG", FlagOne]


SALUTE

unitname action ["SALUTE", unitname]

Soldier 'unitname' salutes, and stays in that animation.
Only works in SAFE and CARELESS mode.

SoldierOne action ["SALUTE", SoldierOne]

unit2 action ["SALUTE", unit1] - makes unit1 salute. If in safe or careless mode, salute will be held, otherwise it is only momentary.


SCUD LAUNCH / SCUD START / SCUD CANCEL

scudname action ["SCUD LAUNCH"]
scudname action ["SCUD START"]
scudname action ["SCUD CANCEL"]

Scudname launches or fires its missile.
The launch process takes about 10.5 seconds.

ScudOne action ["SCUD START"] No scud in ArmA.

SETTIMER

unitname action ["SETTIMER"]

Soldier 'unitname' activates the timer for a satchel charge.
Charge has to be places first via a unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"] command.

SoldierOne action ["SETTIMER"] unit2 action ["SETTIMER",unit1,<bombName>] - adds 30 seconds to the <bombName> countdown. unit1 and unit 2 need not have anything to do with the timebomb, nor be anywhere near it. bombname = nearestObject [bombSettingUnit,"timebomb"].


SITDOWN

unitname action ["SITDOWN", unitname]

Soldier 'unitname' sits down.
Only works in SAFE and CARELESS mode.

SoldierOne action ["SITDOWN", SoldierOne]

unit2 action ["SITDOWN",unit1] - unit2 does nothing (can be GL), unit1 sits down. If not safe or careless, will get straight back up.


STROKEFIST

unitname action ["STROKEFIST"]

Soldier 'unitname' performs a boxing animation.

SoldierOne action ["STROKEFIST"]

Can't get this to do anything. I assume this action is obsolete.


STROKEGUN

unitname action ["STROKEGUN"]

Soldier 'unitname' performs a hitting animation with his weapon.

SoldierOne action ["STROKEGUN"]

unit2 action ["StrokeGun",unit1] - unit2 does nothing, unit1 raises rifle to aim position if it is not already. I assume this action is obsolete.


SWITCHWEAPON

["SWITCHWEAPON", <target>, <weapon index>]

unit2 action ["USEWEAPON",unit1,unit1,n] unit2 plays the pickup animation (can use a gamelogic). unit1 switches to the n index muzzle. Muzzle index seems to be related to order weapons are given to unit with addWeapon, 0-8 being the inherited class weapon muzzles (throw & put) although hard to predict and may include gaps??


TAKEFLAG

unitname action ["TAKEFLAG", flag1]

Soldier 'unitname' takes control of 'flag1'.

SoldierOne action ["TAKEFLAG", FlagOne]


TAKEMAGAZINE / TAKEWEAPON

unitname action ["TAKEMAGAZINE", (vehiclename or unitname), "MAGAZINENAME"]
unitname action ["TAKEWEAPON", (vehiclename or unitname), "WEAPONNAME"]

Soldier 'unitname' takes one magazine/weapon of specified type (see list) from the ground (Weaponholder) or from named vehicle (ammo box, car, etc.).
Transfer happens immediately and via teleportation. Unit1 plays pickup animation at its current position, no matter where 'weapon or magazine' is.

SoldierOne action ["TAKEMAGAZINE", SoldierTwo, "RPGLAUNCHER"]


TAKEMINE

["TAKEMINE", <target>]

unit action ["TAKEMINE",myMine] - can't get it to do anything.

TALK

["TALK", <target>] cant get it to do anything.

TOUCHOFF

unitname action ["TOUCHOFF", unitname]

Soldier 'unitname' touches off satchel charge.

unit2 action ["TOUCHOFF", unit1] - unit1 does not have to do the action.

unitname action ["TOUCHOFF", unitname]

TURNIN / TURNOUT

vehiclename action ["TURNIN", vehiclename]
vehiclename action ["TURNOUT", vehiclename]

Crew of 'vehiclename' turns in/out (gets in and out of hatches).

TankOne action ["TURNIN", TankOne]

AI vehicles seem to want to immediately turn in.

USEMAGAZINE

["USEMAGAZINE", <target>, <magazine creator>, <magazine id>]

gameLogic action ["USEMAGAZINE", player, player,15,4] - cant get it to do anything?


USER

["USER", <target>, <action index>]

gameLogic action ["USER", player, n] will execute the (n + 1)th custom (addAction) action in the players action list if it exists.


USERTYPE

["USERTYPE", <target>, <action index>]

anyUnit action ["USERTYPE", player,n] will crash ArmA.


USEWEAPON

["USEWEAPON", <target>, <weapon index>]

unit2 action ["USEWEAPON",unit1,unit1,0] makes unit2 bend down as if dropping something, unit1 fire/use appropriate weapon if he is in a ready to fire stance? valid indexes seem to range from 0 to at least 16, depending on load carried by unit1. Strange fire effects seem to occur, eg pistol smoke fires from the rpg proxy (straight up?), rpg is readied but not fired, pistol fires from rifle proxy (rifle in hand). Different fire modes for rifle use different index. hand grenades seem to work perfectly. Weapon index seems to be related to order in which weapons are given to unit, 0-8 being the throw and put muzzles??


WEAPONINHAND / WEAPONONBACK

unitname action ["WEAPONINHAND"]
unitname action ["WEAPONONBACK"]

gameLogic action ["WEAPONonBack",unit1] - unit1 raises rifle. Assume animations are missing.