Jump to content
Sign in to follow this  
Neviothr

Help with Trigger Condition

Recommended Posts

I'm creating a scenario and was wondering how can I accomplish the next thing:

In the scenario there is a town under OPFOR control, about a km away from the town there is a response force. BLUFOR's objective is to take the town, and then defend it from the response force.

I want the response force to move to the town (I know how to use waypoints and already have them in place), after OPFOR has been cleared from the town and BLUFOR is in the town. Only when both of this conditions are met, only when BLUFOR is inside the area of the trigger, and there is no OPFOR in the trigger area, will the response force move out towards the town.

How do I do this? Thanks in advance!

Share this post


Link to post
Share on other sites

Don't know if it's the most elegant or most efficient way of doing it, but it's one way of doing it:

[color=#FF8040][color=#006400][i]//true if no opfor are in triggerArea[/i][/color]
[color=#8B3E2F][b]([/b][/color][color=#FF0000]0[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]{[/b][/color]
   [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#000000]opfor[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]side[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color]
[color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] thisList[color=#8B3E2F][b])[/b][/color]

[color=#8B3E2F][b]&[/b][/color][color=#8B3E2F][b]&[/b][/color]

[color=#006400][i]//true if at least one blufor is in triggerArea[/i][/color]
[color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]{[/b][/color]
   [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#000000]blufor[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]side[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color]
[color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] thisList[color=#8B3E2F][b]}[/b][/color][/color]

Kudos to Killzone_Kid for his SQF to BBCode Converter.

Share this post


Link to post
Share on other sites
About synchronization :https://community.bistudio.com/wiki/Mission_Editor:_Synchronization

Cover the area by a trigger activated by anybody, repeatedly, and use the following as condition :

(West countside thislist >0) && (east countside thislist <1)

Don't know if it's the most elegant or most efficient way of doing it' date=' but it's [i']one[/i] way of doing it:

[color=#FF8040][color=#006400][i]//true if no opfor are in triggerArea[/i][/color]
[color=#8B3E2F][b]([/b][/color][color=#FF0000]0[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]{[/b][/color]
   [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#000000]opfor[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]side[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color]
[color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] thisList[color=#8B3E2F][b])[/b][/color]

[color=#8B3E2F][b]&[/b][/color][color=#8B3E2F][b]&[/b][/color]

[color=#006400][i]//true if at least one blufor is in triggerArea[/i][/color]
[color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]{[/b][/color]
   [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#000000]blufor[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]side[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color]
[color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] thisList[color=#8B3E2F][b]}[/b][/color][/color]

Kudos to Killzone_Kid for his SQF to BBCode Converter.

Thank you both very much!

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  

×