OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: limmy3 on 25 Oct 2007, 15:51:44

Title: not Alive fire
Post by: limmy3 on 25 Oct 2007, 15:51:44
Hello,

a Notebook is in the fire place.

Code: [Select]
this inFlame trueThe fire is burning. Name of the object 'Fire'.

The unit can use >Put out fire<.

With not Alive Unit you can check if the unit is dead. Can you do this with a simular command for fire, too.

Perhaps simular:
Code: [Select]
not (Alive Fire)This didn't work!!
or

Code: [Select]
not (Burning Fire)
Who knows?  ??? ???

Regards limmy3
Title: Re: not Alive fire
Post by: Spooner on 25 Oct 2007, 16:14:20
You don't really need to know whether the fire is on if you put the action on the fire rather than on the player:
Code: (init on fire) [Select]
this inFlame true; this addAction ["Put out fire", "putOutFire.sqs"]

Code: (putOutFire.sqs) [Select]
_fire = _this select 0;
_action = _this select 2;

_fire inFlame false;
_fire removeAction _action;
; Perform whatever extra actions that should occur when the fire is extinguished.

To directly answer your question, though, use inflamed (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=h#inflamed) (use the COMREF (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a); inflamed was right next to inflame!):
Code: [Select]
not (inflamed fire)
Title: Re: not Alive fire
Post by: limmy3 on 25 Oct 2007, 16:15:16
Yes thank you spooner

this is the right check

Code: [Select]
inflamed fireplaceOne
When the player clicks on >Put out fire< in the action menu than the fire extinguishes.

Than the Notebook jumps into the air.

That is what I was testing.

Overseen it the first time! 

Regards limmy3