Home   Help Search Login Register  

Author Topic: The time for "Action" has come! (Please do NOT post questions in this thread.)  (Read 29956 times)

0 Members and 1 Guest are viewing this topic.

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Hi people!

We need some help from all of the editing gods in our great community.

The usage of the "action" command is one of the most asked scripting questions, yet a comprehensive list of syntax for every known action that can be performed with this command is nowhere to be found, as far as I know.

I would like everyone to post examples of the different actions which can be carried out using the "Action" command.

I intend on checking, formatting, and placing these examples in our on-line OFP command reference.

In the future, I may either modify the on-line command reference, so that OFPEC users can post examples for ANY command, but for now, I'd just like to post examples for all of the known actions.

The only one I know off hand is "eject" and thats already in there :P , so please post the ones you know, and I will add them to this thread, and eventually add them into our on-line command reference.


Name: Eject
Description: Ejects a unit from a vehicle
Syntax: object action["eject",vehicle]
Example:unit5 action ["eject",vehicle unit5]
Example2:unit5 action ["eject",helicopter1]
Notes: None



# Edited post title[/size]
« Last Edit: 05 Jul 2005, 15:33:12 by macguba »
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:The time for "Action" has come!
« Reply #1 on: 05 May 2003, 15:01:09 »
dere is da take weapon (u already got it in ur mision :P)

name : take weapon
Description : makes unit take weapon from dead body
Syntax : object action ["take weapon",Body,0,0,weapon]
Example : LCD action ["take weapon",toadlife,0,0,primaryweapon toadlife]
Example : LCD action  ["take weapon",deadman,0,0,"m16"]
Notes: 1) u need 2 make da unit get close 2 da body, or it wil take da weapon from very far distance
2) as much as i know changing da nums in da syntax dont change nythin

sec 1 is drop weapon

name : Drop Weapon
Description : makes unit drop its weapon
Syntax : object action ["Drop Weapon",object,0,0,weapon]
Example : toadlife action ["Drop Weapon",toadlife,0,0,((weapons toadlife) select 0)]
Example2 : toadlife action ["Drop Weapon",toadlife,0,0,"m16"]
notes : as much as i know changing da nums in da syntax dont change nythin

3rd get out

name : get out
Description : tels unit 2 get out from vehicle
Syntax : object action ["get out",vehicle]
Example : LCD action ["get out", vehicle LCD]
Example2 : toadlife action ["get out",UAZ1]
notes : same as eject - but eject works beter

4th is get in (syntax not guarunteed ;D - i never used it but it shud b like dat)

name : get in
Description : tels unit 2 get in vehicle
Syntax : object action ["get in",vehicle]
Example : LCD action ["Get in",Hind1]
Example2 : toadlife action ["get in",Uaz1]
notes : dere r beter scriptin wayz 2 do da same thing

:cheers:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:The time for "Action" has come!
« Reply #2 on: 05 May 2003, 18:52:33 »
Here's a few, I can't be bothererd typing much at hte minute so please excuse my poor explanations, I'll do some more later when I can be arsed. Its a good idea though getting them together.

//heal at medic
unitname action ["heal",medicname]

//repair vehicle
unitname action ["Repair",repairvehiclename]

//rearm vehicle
unitname action ["Rearm",vehiclename]

//refuel vehicle
unitname action ["Refuel",refuelvehiclename]

//light fire
unitname action ["Fire inflame",firename]

//put out fire
unitname action ["Fire put down",firename]

//climb up ladder
unitname action ["Ladderup",object 33749]

//blow satchell charge
unitname action ["touchoff"]

//hide dead body
unitname action ["hidebody",deadbodyname]

PS. most of these are instant so use domve and & distance < 3 in a script or something.

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:The time for "Action" has come!
« Reply #3 on: 05 May 2003, 23:56:42 »
Great guys! This is just what I wanted. Don't worrry about putting all of the detals and examples (but thanks anyway LCD :cheers:)..I will handle the testing and writing of the official descriptions, for the command reference.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

XIAOLE

  • Guest
Re:The time for "Action" has come!
« Reply #4 on: 06 May 2003, 13:52:41 »
Just want to thank you toadlife for your:
Example2:unit5 action ["eject",helicopter1]
Cause I got it all wrong from the" Unofficial Operation Flashpoint Command Reference Manual":
unitName action ["actionType"]
Silly me.
I am back "Flashing" again after a long break. I once made a whole campaign game with the mod from http://www.operation-flashpoint.dk but never published it since I feel more at home with you guys at the Editing Center. I later herd that Pentagon hacked my computer and got inspired for the invasion of Iraq though.
To put it short thanks to your Example2, the guys in my intro to my new mission masterpiece are now ejecting just fine …thanks again

XIAOLE.
And the Big Horse lifted it's Tail and fed the little Bird. JACK FLASH!

Offline rom

  • Members
  • *
  • . . .
Re:The time for "Action" has come!
« Reply #5 on: 06 May 2003, 16:01:29 »

Name: Engine off
Description: Stops the engine of a vehicle
Syntax: vehicle action["Engine off"]
Example:chopper1 action ["Engine off"]
Notes: None



Name: Engine on
Description: Starts the engine of a vehicle
Syntax: vehicle action["Engine on"]
Example:chopper1 action ["Engine on"]
Notes: If the AI controls the vehicle it will probably turn the engine on again depending on the situation



Name: Landing gear
Description: Toggles the landing gear of a plane or chopper
Syntax: vehicle action["Land gear"]
Example:plane1 action ["Land gear"]
Notes: If the gear is up then this command lowers the gear and vice versa. If the AI controls the vehicle then it will deny the lowering/rising of the gear depending on the situation.

« Last Edit: 06 May 2003, 16:02:37 by rom »

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:The time for "Action" has come!
« Reply #6 on: 06 May 2003, 18:05:59 »
Also if you use

"GETOUT" without the space, as opposed to
"GET OUT" with the space,

units will be instantly dumped from the vehicle no matter where they are.  That means a heli or boat will not land first and and if in the air there will be no parachute given.

Ben

jojojoni

  • Guest
Re:The time for "Action" has come!
« Reply #7 on: 06 May 2003, 19:32:50 »
Name: Salute
Description: Makes units salute
Syntax: unitname action["SALUTE"]
Example: sol1 action ["SALUTE"]
Notes: Only works in SAFE or CARELESS modes.

Name: Sit down
Description: Makes units sit down
Syntax: unitname action["SITDOWN"]
Example: sol1 action ["SITDOWN"]
Notes: Only works in SAFE or CARELESS modes.

« Last Edit: 06 May 2003, 19:37:31 by Jo-Jo-Joni »

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:The time for "Action" has come!
« Reply #8 on: 07 May 2003, 00:22:11 »
a couple more

//hit with gun
unitname action ["strokegun"]

//hit with fist (need to remove weapon first)
unitname action ["strokefist"]

//put flaps down (can be used twice)
aircraftname action ["FLAPS DOWN"]

//put flaps up (can be used twice)
aircraftname action ["FLAPS up"]

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:The time for "Action" has come!
« Reply #9 on: 07 May 2003, 03:20:30 »
Sweeeeeeet! Didn't know there were so many that actually worked.  :o
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:The time for "Action" has come!
« Reply #10 on: 07 May 2003, 03:56:45 »
i think aoutohover works also ;D but im not sure ;D

somin like

heliname action ["Aouto hover"]

just im not sure if i wite aouto like dat ::)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Pope_Zog

  • Guest
Re:The time for "Action" has come!
« Reply #11 on: 07 May 2003, 13:46:10 »
Name: Take Flag
Description: Makes a unit take a specific flag.
Syntax: unitName action["TAKE FLAG", flagName]
Example: east3 action ["TAKE FLAG", FlagWest]
Notes: None

Pope Zog

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:The time for "Action" has come!
« Reply #12 on: 07 May 2003, 16:36:14 »
Name:            Scud launch preparation
Description:    Makes scud missile move to vertical ready-to-launch position
Syntax:           unitname action ["scud launch"]
Example:        scud1 action ["scud launch"]
Note1:            Takes about 12 seconds
Note2:            Use the command scudstate to check the launch state of the scud


Name:            Scud start
Description:    Makes scud missile ignite and launch
Syntax:          unitname action ["scud start"]
Example:        scud1 action ["scud start"]
Note1:            You do not have to use the action Scud launch first
Note2:            Use the command scudstate to check the launch state of the scud

« Last Edit: 07 May 2003, 16:37:53 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:The time for "Action" has come!
« Reply #13 on: 07 May 2003, 18:42:18 »
to expand on what pope zog said you can use this to attach the flag to the unit

//take flag
unitname action ["take flag",flagname,flagname setFlagOwner unitname]

//return flag
unitname action ["return flag",flagname,flagname setFlagOwner objnull]

//make vehicle crew open hatches
vehiclename action ["Turnout"]

//make vehicle crew close hatches
vehiclename action ["TurnIn"]

BraTTy

  • Guest
Re:The time for "Action" has come!
« Reply #14 on: 08 May 2003, 05:23:27 »
Look in the commented configs.For example here is ManActions.hpp:

// basic actions list
ACTION(Stop)
ACTION(StopRelaxed)

ACTION(TurnL) // turning
ACTION(TurnR)

ACTION(TurnLRelaxed) // turning
ACTION(TurnRRelaxed)

ACTION(ReloadMagazine) // special actions
ACTION(ReloadMGun)
ACTION(ReloadAT)
ACTION(ReloadMortar)
ACTION(ThrowGrenade)

/*!
\internal 1.05 Date 7/17/2001 by Ondra.
- Changed: different logic used to control walking.
It was controlled by mode before, slow actions were added instead.
*/

// ADD BEGIN
ACTION(WalkF)
ACTION(WalkLF)
ACTION(WalkRF)
ACTION(WalkL)
ACTION(WalkR)
ACTION(WalkLB)
ACTION(WalkRB)
ACTION(WalkB)
// ADD END

ACTION(SlowF)
ACTION(SlowLF)
ACTION(SlowRF)
ACTION(SlowL)
ACTION(SlowR)
ACTION(SlowLB)
ACTION(SlowRB)
ACTION(SlowB)

ACTION(FastF)
ACTION(FastLF)
ACTION(FastRF)
ACTION(FastL)
ACTION(FastR)
ACTION(FastLB)
ACTION(FastRB)
ACTION(FastB)

ACTION(Down) // incremental change
ACTION(Up)

ACTION(Lying) // direct change
ACTION(Stand)
ACTION(Combat)
ACTION(Crouch)
//ACTION(OpticsOn)
//ACTION(OpticsOff)
ACTION(Civil)
ACTION(CivilLying)
ACTION(FireNotPossible) // attempt to fire when weapons are disabled


ACTION(Die)

ACTION(WeaponOn) // activate AT weapon
ACTION(WeaponOff) // deactivate AT weapon

ACTION(Default) // no action - used for initialization
ACTION(JumpOff) // no action - used after get out

// special actions - for scripting and effects

ACTION(StrokeFist)
ACTION(StrokeGun)

ACTION(SitDown)
ACTION(Salute)

ACTION(BinocOn)
ACTION(BinocOff)

ACTION(PutDown) // used during some actions
//ACTION(PutDownEnd) // used during some actions

ACTION(Medic)
ACTION(Treated)

ACTION(LadderOnDown)
ACTION(LadderOnUp)
ACTION(LadderOff)
ACTION(LadderOffTop)
ACTION(LadderOffBottom)

// get-in/out

ACTION(GetInCar)
ACTION(GetOutCar)
ACTION(GetInTank)
ACTION(GetOutTank)

/*!
\patch_internal 1.21 Date 8/22/2001 by Ondra.
- New: TakeFlag action for better TakeFlag synchronization.
*/

ACTION(TakeFlag) // used during some actions

ACTION(HandGunOn)






Also a manvehicleactions.hpp of interest

« Last Edit: 08 May 2003, 05:29:50 by BraTTy »