Jump to content
Sign in to follow this  
Tankbuster

end#1 trigger not working

Recommended Posts

I've never done end triggers before and can't see what I've done wrong with this one? It never ends the mission.

QUlfeN6.jpg

I'm pretty sure the condition variables are as expected, I hinted them using this code.

		_tiedcount =  count allMissionObjects "tky_IED";
	hint format ["I count %1\nairport rd %2\ns road %3\nn road %4\ntown centre %5\nw road %6", _tiedcount, triggerActivated ied1, triggerActivated ied2,triggerActivated ied3,triggerActivated ied4, triggerActivated ied5];

I've tried having the onact field in the trigger empty, or forceend or endMission "END1". None worked.

and sure enough it showed 6 and all true.

So what am I doing wrong?

Thanks,

Share this post


Link to post
Share on other sites

So tky_IED is a valid type / subtype? That's about the only error I could possibly spot here. Maybe try fiddling with the "Activation" field, set it to BLUFOR or something.

Share this post


Link to post
Share on other sites

Yeah, tky_IED is the real classname, case is correct.

---------- Post added at 17:03 ---------- Previous post was at 16:41 ----------

Just done it again to check .. heres the hint from the code I pasted in post 1.

awCjbfW.jpg

So, the IED count is correct and all the triggers activations are true, but the mission doesn't end/ :(

---------- Post added at 17:12 ---------- Previous post was at 17:03 ----------

the "Activation" field, set it to BLUFOR .

Tried, still not working.

Share this post


Link to post
Share on other sites

End triggers work well in ARmA3 (just checked in case..), so it's obvious that it's the condition line that isn't working. I would put each condition between brackets to see what happens.

Share this post


Link to post
Share on other sites
End triggers work well in ARmA3 (just checked in case..), so it's obvious that it's the condition line that isn't working. I would put each condition between brackets to see what happens.

It must be the condition that is broken, yes. I put brackets around each condition, still no go. :(

I think I'm going to go at it another way.... put a waitUntil at the end of the init.sqf that checks for the same conditions and forces an end when they are met.

Share this post


Link to post
Share on other sites

Maybe you just could add conditions one by one in the end trigger to see where is the problem.

Share this post


Link to post
Share on other sites
Maybe you just could add conditions one by one in the end trigger to see where is the problem.

Good call. Will do that now.

---------- Post added at 18:49 ---------- Previous post was at 18:42 ----------

Aha!!! Got it!

triggerActivated doesn't work for activation once triggers, only for repeatedly. FFS, why would that be?

Share this post


Link to post
Share on other sites
only for repeatedly. FFS, why would that be?

Welcome to Armaaa :P

Share this post


Link to post
Share on other sites

triggerActivated doesn't work for activation once triggers, only for repeatedly. FFS, why would that be?

Strange, it works for me...

Share this post


Link to post
Share on other sites
Strange, it works for me...

Yes... something isn't right here. triggeractivated works for singleuse triggers in my hint code, but not in the condition field of the trigger. *hits wall with head*

Share this post


Link to post
Share on other sites

This makes me think it's only for campaign:

End <#> - Will cause the mission to end once the conditions are met. There are 6 different winning endings, each with a different possible debriefing text. Different endings to a mission can also lead the player down a different "branch" of a campaign

Never used this type, will search some more...

Have you tried changing A/B axis to 0, and removing forceEnd from onAct?

Edited by panther42

Share this post


Link to post
Share on other sites

I gave up in the end. I can't believe this is this broken. I was hinting the variables used by the condition. For a while I wondered if there is a limit to the number of && you're allowed in the condition field. It does work if you only have 3. Any more and it's broken.

In the end, I put a waitUntil with a sleep and checking exactly the same conditions at the end of the init.sqf and after that a endMission "END1" and it works just fine.

Share this post


Link to post
Share on other sites

So, if only a limited amount of conditions is allowed, you can reduce them this way (for the "triggeractivated" conditions) :

{triggeractivated _x} count [ied1,ied2,ied3,ied4,ied5] == 5

Share this post


Link to post
Share on other sites

Good point. Does that count the trues then? I'd seen the biki page on count and was considering something similar. The nice thing about a waituntil is you can put a sleep in it, massively reducing the performance overhead.

Share this post


Link to post
Share on other sites
Good point. Does that count the trues then? I'd seen the biki page on count and was considering something similar. The nice thing about a waituntil is you can put a sleep in it, massively reducing the performance overhead.

Yep, it count the trues. And it may probably not be performance friendly, as triggers check their condition every 0.5 second IIRC.

Edited by ProfTournesol
one "may" is enough

Share this post


Link to post
Share on other sites

Yeah, that's why I'm quite liking waitUntil {sleep x; condition} for non time critical triggers such as end mission. That, and the fact it actually works! :)

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  

×