OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Shadow_Spyder on 11 Nov 2007, 17:35:34

Title: Simple problem with condition of presence
Post by: Shadow_Spyder on 11 Nov 2007, 17:35:34
Ok, this will probably be simple for you guys, but i'm still new, and also new here, so hows it goin? lol. Anyways, heres my situation and what i've already tried:

I have object_1 here which has a condition of presence set to like 60% or something. I have a script that when blufor detected will cause an effect with this object. NOW, when the object is not there, the trigger has nothing to go off of, and causes ugly little black-box errors at the top-left of screen, SO, what i'd like to do is set it up so that when the object isn't there, the trigger isn't there, when the object is there, the trigger is there.

Things I've Tried:

setting the trigger condition box at True = alive object_1, !(alive object_1), grouping the object to the trigger. None of these worked and now my newb mind has run out of ideas.

Anyone got anything that would work for this? Thanks!
Title: Re: Simple problem with condition of presence
Post by: Planck on 11 Nov 2007, 17:57:03
The trigger is set to fire when bluefor is detected so, possibly:

this && alive object_1

for the condition.


Planck
Title: Re: Simple problem with condition of presence
Post by: Spooner on 11 Nov 2007, 21:50:00
I suspect that that still wouldn't work, since it is still using alive on a non-existant object (which I think would be nil, rather than nullObj). This should work for you:
Code: (trigger condition) [Select]
this and (not (isNil "object_1"))