Trigger...

RockLou

New Member
Reaction score
3
This is sort of a 'wait for condition' trigger, but without a 'wait for condition' action, basically because I have to do a 'unit group - pick every unit and do action' thing for the condition. So I want the bolded area to loop, and I've tried but failed. So what I want is, either a way to make a 'wait for condition' AND to make the 'unit group - pick every unit and do action', OR an action to make the bolded area (the 'then' actions) to loop. And don't know how to do neither.
It feels like the solution is very obvious...>.> This is the last question of a big thing I'm doing.
Code:
Events
    Time - Every 2.00 seconds of game time

Actions
    Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Number of units in (Units within 600.00 of (Position of (Picked unit)) matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green)))) Equal to 0
                Then - Actions
                    [b]Skip remaining actions
                    Trigger - Reset (This trigger) [/b]
                Else - Actions
                    Game - Display to (All players) the text: yo
    Game - Display to (All players) the text: hej
    Trigger - Turn off (This trigger)
It has to loop until the condition is true.
 

noworries

New Member
Reaction score
4
I'm a bit confused, but I would like to help.

You want the bolded area to loop? As in the Then actions? Or..the bolded actions to loop?

I know it says Bolded area, but that and whats in your trigger are conflicting in my mind..
 

RockLou

New Member
Reaction score
3
And I'm not sure I'm explaining it right.

I want the 'then' actions to loop, yeah.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Why do you want them to loop?

EDIT: Ah, now I understand.

Not sure if I'm answering the way you want, but use "For Each Integer A Do Multiple Actions" under the "General" category.

'for each integer a from 1 to 10 do:'

Change the 1-10 to how many times it loops. For example, 2-7 would start at 2 and increase every loop until it reached 7. 1 to 5 would do the same from 1 to 5.
 

noworries

New Member
Reaction score
4
The then action should loop for every unit that player 1 owns that has no units owned by player 11 that isn't around it.

So basically, you have 3 units, 1 of them is next to a unit owned by player 11, the "then" will run twice.

Or are you wanting something different...?
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Assuming "Reset this trigger" makes the trigger re-run itself, why don't you just put that /before/ the Skip remaining actions?

Besides that point, it already is looping with the periodic trigger. Just make it turn itself off when the condition is true.
 

RockLou

New Member
Reaction score
3
Assuming "Reset this trigger" makes the trigger re-run itself, why don't you just put that /before/ the Skip remaining actions?

Besides that point, it already is looping with the periodic trigger. Just make it turn itself off when the condition is true.

It didn't work, so I just threw it in there to see what happened... nothing worked so it ended up wierd, but that's besides the point...
I already have a 'end this trigger' after this condition.

Well Aceheart, does 'reset this trigger' work? I've put it there in the 'then' actions, but it doesn't work! I think there's something wrong with the condition, but I can't see anything!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top