Trigger Queues: Can't find out how to make it work

Dregonx

TH.net Regular
Reaction score
21
I've created a series of triggers to help myself learn how the trigger queue function works, heres how I want it to work first:

A footman is created for a random player in the first part.

Then the queue goes down to the next trigger and checks if the last created footman was owned by player 1 red, if it is then it goes on to the next trigger, which checks for blue, and then another trigger to check if it was for teal, and to explode the previous unit each time.

I need someone that knows how to work with this, to help it work right, so I fully understand what to do when using this. Thanks. :D

(Also, if someone could explain to me why you need to clear trigger queue if at all, and if this leaks how do you remove the leak. Ignore the lack of set points and remove points for this, this is just so I can learn to use the trigger queue.)

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Visibility - Disable black mask
        Visibility - Disable fog of war
        Trigger - Run Random Sequence <gen> (ignoring conditions)

Code:
Random Sequence
    Events
    Conditions
    Actions
        Trigger - Clear the trigger queue
        Trigger - Add Random Spawn A <gen> to the trigger queue (Ignoring conditions)
        Trigger - Add Random Spawn B <gen> to the trigger queue (Checking conditions)
        Trigger - Add Random Spawn C <gen> to the trigger queue (Checking conditions)
        Trigger - Add Random Spawn D <gen> to the trigger queue (Checking conditions)

Code:
Random Spawn A
    Events
    Conditions
    Actions
        Wait 2.00 seconds
        Unit - Create 1 Footman for (Random player from (All players)) at (Center of Region 000 <gen>) facing Default building facing degrees
        Wait 2.00 seconds

Code:
Random Spawn B
    Events
    Conditions
        (Owner of (Last created unit)) Equal to Player 1 (Red)
    Actions
        Unit - Explode (Last created unit)
        Wait 2.00 seconds
        Unit - Create 1 Footman for (Random player from (All players)) at (Center of Region 000 <gen>) facing Default building facing degrees
        Wait 2.00 seconds

Code:
Random Spawn C
    Events
    Conditions
        (Owner of (Last created unit)) Equal to Player 2 (Blue)
    Actions
        Unit - Explode (Last created unit)
        Wait 2.00 seconds
        Unit - Create 1 Footman for (Random player from (All players)) at (Center of Region 000 <gen>) facing Default building facing degrees
        Wait 2.00 seconds

Code:
Random Spawn D
    Events
    Conditions
        (Owner of (Last created unit)) Equal to Player 3 (Teal)
    Actions
        Unit - Explode (Last created unit)
        Wait 2.00 seconds
        Unit - Create 1 Footman for (Random player from (All players)) at (Center of Region 000 <gen>) facing Default building facing degrees
        Wait 2.00 seconds

Code:
Repeating
    Events
        Player - Player 1 (Red) types a chat message containing try again as An exact match
    Conditions
    Actions
        Trigger - Run Random Sequence <gen> (ignoring conditions)

Note: So far all it does is just spawn a footman for red, and then doesn't do anything else.

If you need to know more feel free to ask! :thup:
 

Nerfpl

New Member
Reaction score
53
trigger Queue (what a stupid word) it set triggers in queue (lol) so they wait for each other. second trigger cant run if first didnt.
like if all start after 5 seconds of game time. you set queue (omg), actually yo u add desired trigger, so they run in order.

clearing is probably to dont type 1k times "remove trigger A from ..." when you want to set new Q
 

Nerfpl

New Member
Reaction score
53
maybe i said bit bad because

"This adds a trigger to trigger queve, you can add multiple triggers to it, and after first trigger on trigger queve has been removed form it, second trigger will run, once second is removed form queve it will run third and so on."

try adding trigger 1,2,3,4,5,6 etc which only show text message and have no event.
with another trigger(0) (with some event) :
add them to queue and see what happens
if nothing then
after adding fire trigger 1 by "run trigger checking conditions"
 

Dregonx

TH.net Regular
Reaction score
21
maybe i said bit bad because

"This adds a trigger to trigger queve, you can add multiple triggers to it, and after first trigger on trigger queve has been removed form it, second trigger will run, once second is removed form queve it will run third and so on."

try adding trigger 1,2,3,4,5,6 etc which only show text message and have no event.
with another trigger(0) (with some event) :
add them to queue and see what happens
if nothing then
after adding fire trigger 1 by "run trigger checking conditions"


Sweet man thanks, I'd +Rep ya again, but only once per day. >_<
 

Nerfpl

New Member
Reaction score
53
Ok i have correct info now. did few tests ( i was corious too)

when trigger is added to Queue and is first, it will instanly run
if you add like 4 triggers at once A,B,C,D:

trigger A will run (checking or ignoring condition)
but trigger B will not run Until trigger a have (executed) "Trigger - Remove (This trigger) from the trigger queue"
and same with C. it will not run until B dont make action "Trigger - Remove (This trigger) from the trigger queue"
if trigger B dont have such action, trigger C will not run.

its actually preety cool because you can extremly manipulate this if you have ideas.
 

Dregonx

TH.net Regular
Reaction score
21
Ok i have correct info now. did few tests ( i was corious too)

when trigger is added to Queue and is first, it will instanly run
if you add like 4 triggers at once A,B,C,D:

trigger A will run (checking or ignoring condition)
but trigger B will not run Until trigger a have (executed) "Trigger - Remove (This trigger) from the trigger queue"
and same with C. it will not run until B dont make action "Trigger - Remove (This trigger) from the trigger queue"
if trigger B dont have such action, trigger C will not run.

its actually preety cool because you can extremly manipulate this if you have ideas.

Yeah, I was thinking the same thing lol. I just figured it all out after messing around for a bit. Thanks to you :shades:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top