OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Horizon on 19 Aug 2005, 04:49:36

Title: I have a small scripting problem
Post by: Horizon on 19 Aug 2005, 04:49:36
I have a small scripting problem.

I have used a boom gate (Addon) in a map that I'm making that starts closed and I need it to open with a trigger rather then me having to go to it and operating it myself.

I have read a tutorial on scripts (using action) but still cant work it out.
Can anyone lend a hand?


Thanks
Title: Re:I have a small scripting problem
Post by: bedges on 19 Aug 2005, 07:33:29
animations within addons are usually controlled using the  animate  (http://www.ofpec.com/editors/comref.php?letter=A#animate) command.

you need to find out the name of the gate in the config, and then set its animation phase to 0 or 1.

you may need to de-pbo the addon to find the information, for which you will need this (http://www.ofpec.com/editors/resource_view.php?id=358).
Title: Re:I have a small scripting problem
Post by: macguba on 19 Aug 2005, 10:55:00
And the trigger would be

Condition:  as you like
On Activation:   the animate stuff you have discovered
Title: Re:I have a small scripting problem
Post by: Blanco on 19 Aug 2005, 15:22:49
That boom addon is that the kkb Gate you are talking about?

If so,
name_of_gate animate ["arm", 1]  to open
and
name_of_gate animate ["arm", 0] to close