OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hidden Death on 20 Apr 2005, 06:42:59

Title: Mapfacts objects
Post 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!
Title: Re:Mapfacts objects
Post by: StonedSoldier on 20 Apr 2005, 09:04:39
if i was you i'd run those from the init.sqs
Title: Re:Mapfacts objects
Post by: Speeder on 20 Apr 2005, 09:15:38
I second that one
Title: Re:Mapfacts objects
Post by: Hidden Death on 20 Apr 2005, 23:03:12
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.
Title: Re:Mapfacts objects
Post by: macguba on 20 Apr 2005, 23:28:08
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.
Title: Re:Mapfacts objects
Post by: Wadmann on 21 Apr 2005, 01:04:07
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
Title: Re:Mapfacts objects
Post by: Hidden Death on 21 Apr 2005, 02:23:32
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
Title: Re:Mapfacts objects
Post by: Morglor9 on 21 Apr 2005, 04:50:12
i believe you still have to type "object" (without quotes) in front of the number.
Title: Re:Mapfacts objects
Post by: Wadmann on 21 Apr 2005, 16:32:59
@ 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
 
Title: Re:Mapfacts objects
Post by: Hidden Death on 21 Apr 2005, 21:46:18
It Works!!!!!!!!!!!!!!!!!!!!!!!!!!


Thank you all ill keep you updated on my missions progress