OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: redmenace on 16 Dec 2005, 02:19:38

Title: fuel station objective
Post by: redmenace on 16 Dec 2005, 02:19:38
Hey,

how would I make it so an objective is complete upon destroying a paticular fuel depot?

thanks
Title: Re:fuel station objective
Post by: SEAL84 on 16 Dec 2005, 02:27:10
You can use a trigger.  Place it on the map right next to the fuel station and hit F2, then drag the thin line to the gas station itself.  the trigger will say "static object" and click "not present."  The gas station must be within the trigger's radius; hence when it's destroyed it won't be there anymore and the trigger will fire.

Then in the "on activation" field, type

"objective_1" objstatus "DONE"

where "objective_1" is whatever you named the objective in the briefing file.
Title: Re:fuel station objective
Post by: THobson on 16 Dec 2005, 17:49:16
I didn't know about that.  An alternative is:

get the object id of the fuel station from the map and set a trigger to fire on

getDammage (object XXXX) > 0.95

where XXX is the object id number of the fuel station
Title: Re:fuel station objective
Post by: marcus3 on 16 Dec 2005, 18:31:31
or
make a trigger, in condtion field put

not canmove (object XXXX)

then, in the onactive field put

"X" objstatus "DONE"
 ^
X = the number of the objectve

hope this helps  ;)
Title: Re:fuel station objective
Post by: Planck on 16 Dec 2005, 18:57:07
Emmm, do fuelstations move?

AFAIK static objects can't move anyway.

Should work for vehicles though.   ;)

Planck
Title: Re:fuel station objective
Post by: redmenace on 16 Dec 2005, 19:52:03
the first one works anyway :p
Title: Re:fuel station objective
Post by: marcus3 on 16 Dec 2005, 20:24:28
well...it works for me  ;D
Title: Re:fuel station objective
Post by: THobson on 16 Dec 2005, 21:33:20
Musing on options - it might even be possible to put a killed Event Handler on the thing.  I have done that with a table.
Title: Re:fuel station objective
Post by: Morglor9 on 17 Dec 2005, 06:11:58
how does a table die?
Title: Re:fuel station objective
Post by: THobson on 17 Dec 2005, 09:58:25
If you shoot it enough times - or hit it with a grenade.  A bit like a person really