Jump to content
Sign in to follow this  
_qor

Trigger doesnt trigger repeatedly

Recommended Posts

Hey folks,

I have got some troubles with a trigger which should fire each time ANYBODY is PRESENT.

Scenario: enemy units within trigger area activated the trigger once. A group standing outside the trigger area now shoots the enemies and moves inside the trigger area.

Unfortunately the trigger doesnt get activated when the group moves inside.

I tried this scenario without my OnAct settings of the trigger and it works as it should. What might prevent the trigger from firing when new units move inside?

Trigger (HOME1trig)

OnAct: hint "active"; HOME1counter = true; script = [] execVM "CHECKPOINTS\takeover.sqf"

takeover.sqf

HOME1ratioW = 0;

HOME1ratioE = 0;

if ((west countSide list HOME1trig > east countSide list HOME1trig)) then {

while { (west countSide list HOME1trig > east countSide list HOME1trig) AND (HOME1counter) } do {

HOME1ratioW = HOME1ratioW +1;

sleep 1;

}; };

if ((west countSide list HOME1trig < east countSide list HOME1trig)) then {

while { (west countSide list HOME1trig < east countSide list HOME1trig) AND (HOME1counter) } do {

HOME1ratioE = HOME1ratioE +1;

sleep 1;

}; };

Trigger to cycle:

Condition: HOME1ratioW == 10

OnAct: playSound "CodeBad"; hint "WEST dominates"; HOME1counter = false; "HOME1_west" setMarkerColor "ColorBlue"

There is an equivalent trigger for firing when HOME1ratioE == 10

Edited by _qoR

Share this post


Link to post
Share on other sites

The sequence is:

The trigger is activated

The trigger is deactivated

The trigger is activated a second time.

If the trigger does not deactivate it cannot be activated a second time.

.

Share this post


Link to post
Share on other sites

Right!

So when the units within the trigger area die, the trigger should be deactivated. When another unit which is outside the trigger area then enters the trigger area, the trigger should fire again.

Anyway, this scenario works when I simply do it with a trigger and 2 units inside/outside. But not with this OnAct: hint "active"; HOME1counter = true; script = [] execVM "CHECKPOINTS\takeover.sqf".

Cant see any other reasons. And dont even see this is a reason...

Share this post


Link to post
Share on other sites

Got it!

There are two MG Nests which I not imagined to be "ANYBODY" cause they are "empty" warfare buildings.

So next question is how to delete them out of that trigger's calculation...

Share this post


Link to post
Share on other sites

First, move them out of the trigger area and see if that solves the problem for the moment.

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  

×