Home   Help Search Login Register  

Author Topic: not Alive fire  (Read 962 times)

0 Members and 1 Guest are viewing this topic.

Offline limmy3

  • Members
  • *
  • OFP crazy!
not Alive fire
« 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
The only necessary for triumph of evil is for good men to do nothing.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: not Alive fire
« Reply #1 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 (use the COMREF; inflamed was right next to inflame!):
Code: [Select]
not (inflamed fire)
« Last Edit: 25 Oct 2007, 16:21:04 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline limmy3

  • Members
  • *
  • OFP crazy!
Re: not Alive fire
« Reply #2 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
« Last Edit: 25 Oct 2007, 16:22:45 by limmy3 »
The only necessary for triumph of evil is for good men to do nothing.