OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Jim666 on 15 May 2005, 16:13:04

Title: alive?
Post by: Jim666 on 15 May 2005, 16:13:04
nearly got a mission completed, just need to sort out the objectives.

Ive got a shilka that needs to be taken down, also i have a trigger set up to tick the objective to be done once the shilka is destroyed, the only problem is ive forgot the code to check whether the shilka i still alive.

I checked the com red but that didnt really help.

Cheers.
Title: Re:alive?
Post by: macguba on 15 May 2005, 16:15:10
not canMove shilka1 and not canFire shilka1
Title: Re:alive?
Post by: Jim666 on 15 May 2005, 16:16:23
Cheers, will check it out now.
Title: Re:alive?
Post by: Silencer on 15 May 2005, 16:26:19
? (alive shilka) : .........
Title: Re:alive?
Post by: macguba on 15 May 2005, 16:32:59
Silencer, you're half right.    "alive" is the right command for this kind of thing when you are talking about soldiers.   However, it is not appropriate for vehicles.

Why not?   Because it doesn't work properly.   Plug a law into a BMP and it blows up.   Is it alive?  Obviously not ... except that the alive command might think it is.    Many a mission has failed to finish until you've gone round all the armour and put an extra missile into the vehicle that looks dead but isn't.


Title: Re:alive?
Post by: Jim666 on 15 May 2005, 16:35:44
Thanks Macguba that worked, but ive got one problem.

The hint comes up to ssay that the objective is complete but it doesnt tick the objective on the briefing.

in the activation field i have the following.

Code: [Select]
"obj_1" objStatus "DONE"; hint "Objective complete: Shilka destroyed."
see anything wrong?, ive checked through the other objectives, and thought that it might have the "obj_1" objStatus "DONE" in it, (i thought they would conflict) but they're different.
Title: Re:alive?
Post by: macguba on 15 May 2005, 16:44:22
Try

"1" objStatus "done"

but as everybody on this forum knows, syntax is not my strong point.
Title: Re:alive?
Post by: Jim666 on 15 May 2005, 16:58:06
That worked. Thanks
Title: Re:alive?
Post by: Silencer on 16 May 2005, 09:28:49
Thank you, I again have learned something new!