Jump to content
Sign in to follow this  
iceman77

&& Command

Recommended Posts

I set up a simple trigger to detect if 3 vehicles are destroyed. I don't know why it doesn't work, seems simple enough.

Condition: !alive tung1 && tung2 && tung3

onact: hint "All objectives have been destroyed"

RPT:

Error in expression <!alive tung1 && tung2 && tung3>
 Error position: <&& tung2 && tung3>
 Error &&: Type Object, expected Bool

Did BI change something or am I doing it wrong? I could of swore that's what I used in the past to do to detect if multiple objects were dead...

Share this post


Link to post
Share on other sites

!(alive tung1) && !(alive tung2) && !(alive tung3)

What your code was saying was "Is the object tung1 destroyed and variables tung2 and tung3 true?" The code I just posted says "Is tung1 dead and tung2 dead and tung3 dead?"

There's a few other ways of typing it too.

Share this post


Link to post
Share on other sites

Thanks. Could have swore I didn't have to include the "!alive" before each object. Oh well, thanks alot.

Share this post


Link to post
Share on other sites

!(alive tung1) && !(alive tung2) && !(alive tung3)

I come to the editing forum often and once every now and then something fabulous like this appears!

Thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×