OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hidden Death on 20 Apr 2005, 06:42:59
-
Im trying to make a mission on Mapfact's Nogova Island but i can seen to appy the scripts to open the gates. Here are the Scripts
Opening/closing barriers, fencedoors and gates.
(object NUMMER) animate ["Component02", 1/0]
Opening/closing the gates of the concrete-hangars.
(object NUMMER) animate ["TorL", 1/0]
(object NUMMER) animate ["TorR", 1/0]
Im a noob at this so what do i use gamelogic, trigger or objects. please Help!
-
if i was you i'd run those from the init.sqs
-
I second that one
-
if i was you i'd run those from the init.sqs
init.sqs?
Like i said i'm a noob so whats init.sqs and where is it.
-
You need my Guide to mission editing for beginners from the Editors Depot. Also read the Scripting Topics section of the command reference and snYpir's excellent How to use Objectives and init.sqs.
-
You could use a trigger placed at a point just prior to the gate, set Activation to whatever side you want to open (or close) the gate, group it (F2 and drag a line from unit to trigger) to the unit that willl open gate, then put this in the onActivation line:
(object NUMMER) animate ["Component02", 1]
to open or
(object NUMMER) animate ["Component02", 0]
to close the gate.
You will need to enable "Object IDs" in editor and replace the "NUMMER" (without quotes) with whatever the object ID number is on the map.
When the unit comes into the trigger zone, the gate will open or close.
Wadmann
-
ok ill try it
=Edited=
ok tryed it and got this error
I put this in a trigger assigned to my player
(148150) animate ["Component02", 1]
animate: Type Number, expected object
The map is MapFacts Nogova Island Ver1.22 island M
-
i believe you still have to type "object" (without quotes) in front of the number.
-
@ Morglor9
You are correct.
@ Hidden Death
You should get very familar with the commands for OFP. Either print out a command reference or bookmark the online version so that you will understand what each commands needs to operate correctly.
Here (http://www.ofpec.com/editors/comref.php?letter=O#object) is the ComRef for the command "object". Just put "object" (without quotes) in the parenthesis before the actual object number like so:
(object 148150) animate ["Component02", 1]
Wadmann
-
It Works!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you all ill keep you updated on my missions progress