OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: palleand on 30 Oct 2002, 09:44:05
-
I have a downloaded a gate that can be open/closed, but i cant get it to open when a friendly car/armor approches. how do i get it to open/closes???? ???
-
Check your README File that came with the addon, should have operational tutorial in there. Ive read it once but never messed with the gate in the editor.
-
useful commands:
opening closing with script:
<gatename> animate ["arm", 1]    //opens the gate
<gatename> animate ["arm", 0]    //closes the gate
checking current state of gate with script:
<gatename> animationPhase "arm" < 0.5   //if true -> gate is closed
<gatename> animationPhase "arm" >= 0.5   //if true -> gate is open
-------------------------
Just to cry it out loud here ( :hmm: ) :
"README" means READ THIS TEXT_DOCUMENT :o ;D
Anyho' - say, ya named a gatearm "GATE_ONE", then a trigger would have to read :
Condition: FriendlyCarName Distance GATE_ONE <= 20
On Activation: GATE_ONE Animate ["arm", 1] 8)
laterz :-*