Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
5133p39

end game triggers - why it doesn't work?

Recommended Posts

I have a few Resistance units, when any of those units die, it will be respawned in a "prison" which he cannot leave.

When all of the Resistance units are imprisoned, the game should end, but it does not.

I made a triger which is spread over the prison to count the imprisoned units and has the following parameters:

activationBy="GUER";

repeating=1;

type="SWITCH";

age="UNKNOWN";

name="PRISON";

expCond="((RES_UNITS_CNT > 0) and (Count thisList >= RES_UNITS_CNT))";

expActiv="GAME_OVER = true";

expDesactiv="GAME_OVER = false";

...the RES_UNITS_CNT is a count of all Resistance units (and it's value is ok - i even tried to set it manually, so that's not the cause)

...and another trigger which is activated when GAME_OVER = true, and it should force the game to end:

activationBy="ANY";

type="END1";

age="UNKNOWN";

name="ENDGAME1";

expCond="this and GAME_OVER";

expActiv="[] exec ""Outro.sqs""";

for now, the Outro.sqs contains only one command:

ForceEnd

But it does not work. Any idea why?

EDIT: i forgot to say, it's a MP mission

Share this post


Link to post
Share on other sites

so, noone knows?

is there any GOOD AND RELIABLE guide to triggers? (i have read plenty of such guides, but they were just horrible - stating things which, even i know, aren't true)

Share this post


Link to post
Share on other sites

I'd suggest you to track your GAME_OVER variable because as I can see it's a significant element in this case. E.g. make a radio trigger with repeatidly activation and put in the activation field this simple line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["%1",GAME_OVER]

Then you'll see if the condition of the first trigger is ever met.

And btw, the second trigger - you can set activation by to "none" and in the condition field put only GAME_OVER - that will work either.

Share this post


Link to post
Share on other sites

voodzia: you were right, the GAME_OVER was allways false. Now to find a cause of this.

I was so certain about the RES_UNITS_CNT variable, so i didn't checked it - just tried to set it manually, and i thought it must be right then, and that was the cause. Because later in another script this variable was doubled due to some logical error in one condition.

So the (Count thisList >= RES_UNITS_CNT) never could be true!

THANKS VERY MUCH, without you, who knows how long i would be blind to my own faulty scripts smile_o.gif

...and please, someone, delete this thread, it's totally worthless.

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  

×