OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 23 Sep 2004, 11:58:52

Title: Addaction tute
Post by: The-Architect on 23 Sep 2004, 11:58:52
Thanks to Macguba for explaining what's to be done about dodgy or difficult tutorials.  ;D

I want to learn addaction.

I found this tutorial in the Ed depot,

Addaction removeaction by uiox

I have no idea what to do with it, nor is there a readme or explanation.

Can anyone help?

Cheers.
Title: Re:Addaction tute
Post by: Homefry31464 on 23 Sep 2004, 12:42:13
Hmm, it would seem he just added an example mission, running scripts with addaction commands inside them.... However, I don't see any comments for any of the scripts..

If you would like, I'll write an addaction tutorial for you.
Title: Re:Addaction tute
Post by: veston pants on 24 Sep 2004, 10:38:19
I'd be chuffed if you would fella.
The one by uiox is pretty good if you alrerady know what your doing, but pretty useless if you don't :o
Using radios to trigger triggers could be another 1 that perhaps needs revised, 1 that covers only bein able to use a radio in a certain area, ie. where a radio is placed would be top drawer.

Title: Re:Addaction tute
Post by: OFPfreak on 29 Dec 2004, 00:46:24
hey its pretty easy altough I self dont know how to make an addaction command the runs a script with parameters. This is how you run a script with no parameters:

1. make a trigger
2. in the on activation put:
On Activation: unitname addaction ["kill myself!","killself.sqs"]

thats how you type it. But if you do it like this, or the script does not contain a removeaction line modify it like this:

On Activation: action1=unitname addaction ["kill myself!","killself.sqs"]
On Deactivation: unitname removeaction action1

Eh I hope it helps you!
Title: Re:Addaction tute
Post by: DBR_ONIX on 03 Jan 2005, 14:07:22
On the subject of addaction..
Very few people seem to know about this..
But..
Code: [Select]
acction1 = this addaction ["Expode self",{bomb1="laserguidedbomb" camcreate getpos this}]
You can of course change that camcreate code, but it works on lots of stuff.. An usfull example is :
Code: [Select]
acction2 = this addaction ["Expode self",{[guy1,guy2,this] exec "script.sqs"}]

;)
- Ben
Title: Re:Addaction tute
Post by: Triggerhappy on 03 Jan 2005, 18:06:18
you can do that? i thought it was only eventhandlers...
Title: Re:Addaction tute
Post by: DBR_ONIX on 09 Jan 2005, 16:14:13
Argh.. Your correct! I keep forrgeting about that..
- Ben
Title: Re:Addaction tute
Post by: XCess on 24 Jan 2005, 08:40:45
so is runniong scripts with parameters possible? Would be very useful.
Title: Re:Addaction tute
Post by: Triggerhappy on 24 Jan 2005, 22:53:44
not in addaction
but you can with eventhandlers