Jump to content
Sign in to follow this  
Acid

Error type expected bool

Recommended Posts

On my mission one of the objectives is to destroy all american aircraft stationed at an airport, now ordinarily i would just group them or something, but the thing is the actul aircraft themselves have their side set to empty as the idea is that the pilots are standing around in the airport, and when an enemy is detected, the pilots get in the aircraft and use them to attack/defend. There are nine aircraft that need destroying in all, but im not sure how to make the objective complete trigger fire when all of the aircraft are destroyed. i tried the following in the condition field:

not (alive air1 and air2 and air3 and air4 and air5 and air6 and air7 and air8 and air9)

i also tried:

not (alive air1); not (alive air2); not (alive air3); not (alive air4); not (alive air5); not (alive air6); not (alive air7); not (alive air8); not (alive air9)

and i also tried:

not (alive air1) and not (alive air2) and not (alive air3) and not (alive air4) and not (alive air5) and not (alive air6) and not (alive air7) and not (alive air8) and not (alive air9)

In the first and last entires all i got was the error:

*everythig in condition field* error type expected bool

In the second entry though the code seemes to work, but the trigger fire when any of the aircraft were destroyed, instead of firinh when all of them were gone. What do i actually put in the condition field of the trigger so that the trigger wont fire until ALL of those aircraft are gone?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(alive unit1) AND !(alive unit2)....<span id='postcolor'>

!=NOT, u can use either.

You can also use

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(canmove unit1)<span id='postcolor'>

that way the planes only have to be disabled. I said your placing empty units, so alive command should be alright. But if your not placing empty units, active units (with crew already in then), use the canmove command. That way you woun't have to kill the crew (as well) to activate the trigger.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Acid @ Feb. 19 2002,11:50)</td></tr><tr><td id="QUOTE">and i also tried:

not (alive air1) and not (alive air2) and not (alive air3) and not (alive air4) and not (alive air5) and not (alive air6) and not (alive air7) and not (alive air8) and not (alive air9)<span id='postcolor'>

i did that, as you can see from the quote, or do you mean something similar but a bit different?

Share this post


Link to post
Share on other sites

Try

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(canmove unit1) AND !(canmove unit2) AND !(canmove unit3)<span id='postcolor'>

It's odd, it works for me. I just tried:

not (alive air1) and not (alive air2)

and the trigger activated when both units were dead.

Share this post


Link to post
Share on other sites

Has anyone ever told you your twirly plane's almost hypnotic...

not (alive air1) and not (alive air2)

confused.gif I used this code in a mission ages ago with similar circumstances and I seem to remember it working. Perhaps I am wrong?

Share this post


Link to post
Share on other sites

yeah, its like a lava lamp. could do with some gfx corrections though, theres bits of it dissapering on some of the frames

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Acid @ Feb. 20 2002,11:50)</td></tr><tr><td id="QUOTE">not (alive air1 and air2 and air3 and air4 and air5 and air6 and air7 and air8 and air9)<span id='postcolor'>

Hmm...I think this command should work:

NOT(alive air1 OR alive air2 OR alive air3 OR alive air4 OR alive air5 OR alive air6 OR alive air7 OR alive air8 OR alive air9)

Though I haven't tried this in the editor lately and my memory is faulty. And I haven't tried checking this many units!

Share this post


Link to post
Share on other sites

urgh...no that wouldn't work. because that line of code is using or commands the trigger would fire when any of theose units are dead. anyway it doesn't matter now i fixed that problem like an hour after i made my last post in this thread. i have a different problem now which i posted about, its to do with a cutscene script which aint working properly.

Share this post


Link to post
Share on other sites

No that command should work, NOT to my understanding inverts everything including OR and AND. But then again I also thought NOT(alive air1) and NOT(alive air2) would work too. NOT(alive air1 OR alive air2) is basically the same thing.

Share this post


Link to post
Share on other sites

(Editted: I made mistake)

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (SCLZ @ Feb. 25 2002,21:50)</td></tr><tr><td id="QUOTE">No that command should work, NOT to my understanding inverts everything including OR and AND. But then again I also thought NOT(alive air1) and NOT(alive air2) would work too. NOT(alive air1 OR alive air2) is basically the same thing.<span id='postcolor'>

NOT(alive air1 OR alive air2) returns true only if:

both are dead

NOT(alive air1) and NOT(alive air2) returns true only if:

Both are dead

so any statement like

NOT(alive air1 OR alive air2 OR....)will return true if all of them is dead.

btw. did you try (not(alive air1))and(not(alive air2))  ? stupid parenthesis.

Share this post


Link to post
Share on other sites

you know im glad i fixed that problem before i read your original post there ralph, as that whole thing made me even more confused than when i started. wink.gif

and no NOT doesn't invert the AND, OR commands it can simply be used to coincide with them. for exmaple when wanting a trigger to fire when one of two units is dead you would use:

NOT (alive unit1) OR NOT (alive unit2)

as this specifies that the trigger should fire when unit1 OR unit2 is dead.

when the trigger is to fre only when both units are dead you use:

NOT (alive unit1) AND NOT (alive unit2)

as this specifies the trigger to fire when unit1 AND unit2 are dead.

Share this post


Link to post
Share on other sites

sorry for confusing ya...something in the back of my mind told me that something was wierd with my original post, so I came back and thought about it, and realized my mistake.....

sorry to confuse ya. confused.gif

Share this post


Link to post
Share on other sites

This ought to be added to the FAQ. That boolean error occurs all too frequently.

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  

×