OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kilo11 on 24 May 2005, 23:08:23
-
I was wondering how I would open a gate/barrikade (the red and white ones with the stop sign) that is already on the map.
I have tired multiple ways and command and scripts, and none were successful. Anyhelp in being able to open and close these gates would be usefu. Some info you may want:
ISLAND: FDF East Border
OBJECT: 21595
?COMMAND?: This Animate ["gateanim",0] & This Animate ["gateanim",1]
-
;DHi
To open gate: objectid animate ["keppi", 1]
To close it again use: objectid animate ["keppi", 0]
The ID is a number which can be revealed by pressing the "show ids" button in editor.
Zoom close and you'll see the lot of numbers. Just find the gate arm and note the number of it.
Put this in the ON ACTIVATION field of a trigger.
(object 21595) animate ["keppi",0]
To automatically open gates use following trigger:
Activation set to "Repeatedly"
Trigger name (this must be of course unique): trigger1
On Activation: (nearestObject [trigger1, "FDFrajapuomi"]) animate ["keppi", 1]
On Deactivation: (nearestObject [trigger1, "FDFrajapuomi"]) animate ["keppi", 0]
Hope this helps
Dan :P
-
Worked like a charm :-) Thanks!