Jump to content
Tankbuster

triggeractivation west seized. How to make it happen for debug

Recommended Posts

Guys,

 

I've got a west seized triggeractivation in my mission. Some of my other triggers used not present east.

 

So that I can test the mission, I have a debug script that can kill all the easts in the trigger area. For the east not present trigger, this works just fine, but for the west seized trigger it usually doesn't. Sometimes teleporting a west soldier into the trigger makes the trigger activate, sometimes not.

 

The question is, how can I, in debug, make the west seized trigger activate reliably? So far, I've tried with limited success, creating west AI in there to tip the seized calculation over the top.

Might it be possible to rewrite the settriggeractivation line using debug? Perhaps change it to east not present just for the purposes of making the trigger activate? <<<< Not actually tried this yet. :)

 

Any other thoughts?

 

Thanks

 

Tanky -Paul-

Share this post


Link to post
Share on other sites

What are your other settings for that seized by trigger?

 

 

 

  • Seized by <side> - Will activate when the seizing side is deemed to be in control of the area. This trigger type works with the Timeout Counter values - a low level of dominance will activate the trigger after a period of time close to the max timeout, and visa versa. Depending on unit types, the seizing side can be completely outnumbered (4:1) and still satisfy the minimum required level of presence for the Maximum timeout counter. This trigger type can also be used with the any Detected By <side> option, meaning only units known to the Detected By side will be considered by the seized by calculation. This can easily create some interesting area domination effects. For example, a Seized by BLUFOR trigger using the Detected By BLUFOR option will activate when BLUFOR think they have seized the area, while the same trigger using Detected by OPFOR option will activate when OPFOR think BLUFOR have seized the area. The Not Present option inverts the triggers normal behaviour (ie, Not Seized by <side>).

Share this post


Link to post
Share on other sites

Nothing unusual;

	// make trigger that senses when airport or mil base is empty of enemies
	trg2 = createTrigger ["EmptyDetector", cpt_position];
	trg2 setTriggerArea [(cpt_radius + 200),(cpt_radius + 200),0,false];
	trg2 setTriggerActivation  ["WEST SEIZED", "PRESENT", false];
	trg2 setTriggerTimeout [5, 50, 120, true];
	trg2 setTriggerStatements ["this", "diag_log '***target conquered'; _t = [thisList,position thisTrigger] execVM 'server\ai_surrenderSurvivorsmanager.sqf';", ""]

Share this post


Link to post
Share on other sites

Still thinking about this...

 

Is setTriggerStatements the way to make the trigger activate when required outside of the usual seized condition? The biki page says

 

 

Trigger condition has to return Boolean. true will activate the trigger, false will deactivate it

 

Does that mean that if I change to code posted earlier to


	trg2 setTriggerStatements ["triggeractivatedebugvariable", "diag_log '***target conquered'; _t = [thisList,position thisTrigger] execVM 'server\ai_surrenderSurvivorsmanager.sqf';", ""]

And set triggerativatedvariable to true, the trigger will activate on command?

Share this post


Link to post
Share on other sites

Still thinking about this...

 

Is setTriggerStatements the way to make the trigger activate when required outside of the usual seized condition? The biki page says

 

 

Does that mean that if I change to code posted earlier to

	trg2 setTriggerStatements ["triggeractivatedebugvariable", "diag_log '***target conquered'; _t = [thisList,position thisTrigger] execVM 'server\ai_surrenderSurvivorsmanager.sqf';", ""]

And set triggerativatedvariable to true, the trigger will activate on command?

 

Yes. 'this' in the context of trigger condition is a reference to the condition you'd set up with setTriggerActivation or when manually configuring the trigger. You can omit or combine it as you please. If you remove 'this', the trigger basically ignores the triggerActivation conditions and becomes a something like a waitUntil which executes the activation code after it is met.

 

So for example, with the condition you can do the following things:

this // Will activate according to triggerActivation
myVariable // Will activate when myVariable becomes true
this && myVariable // Will activate when triggerActivation is met AND myVariable becomes true
this || myVariable // Will activate when triggerActivation is met OR myVariable becomes true
  • Like 1

Share this post


Link to post
Share on other sites

That's what I thought. Thanks SW. I'll try that this evening.

Share this post


Link to post
Share on other sites

That works a treat. Thank you so much! :)

  • Like 1

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

×