trigger no spawn creeps at the same time to all regions

Shlomi1515

New Member
Reaction score
2
i did this trigger

and it spawn the creeps to player1 (me) and after it finish the trigger it's start to spawn for player 5 (computer[enemy of player 9])

how do i make it to spawn at the same time?

Code:
Levels
    Events
        Timer - Level_Timer expires
    Local Variables
    Conditions
    Actions
        Timer - Destroy Window_Level_Timer
        Variable - Set Level = (Level + 1)
        Player Group - Pick each player in (Enemies of player 9) and do (Actions)
            Actions
                Trigger - Turn Trigger Gold On
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds
                Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
 

Frozenwind

System maker
Reaction score
99
You have wait functions inside your unitgroup. So basically, you have to wait for player red, then for blue, then for teal before purple will spawn.
How to fix this?

Like this:
Code:
Levels
    Events
        Timer - Level_Timer expires
    Local Variables
        IntegerA <integer>
    Conditions
    Actions
        Timer - Destroy Window_Level_Timer
        Variable - Set Level = (Level + 1)
        For each IntegerA from 1 to "number of creeps per level, 20?"
            Actions
                Player Group - Pick each player in (Enemies of player 9) and do (Actions)
                    Actions
                        Trigger - Turn Trigger Gold On [COLOR="SeaGreen"]///Why do you have this inside the unitgroup? Can't it be in front? I mean, on is on, right?[/COLOR]
                        Unit - Create 1 Creep[Level] for player 9 at (Center of Region[(Picked player)]) facing 270.0 degrees (Ignore Placement)
                General - Wait 0.5 Game Time seconds

Sorry, I wrote it by hand, ask if u don't understand something.
 

Flare

Stops copies me!
Reaction score
662
Trigger:
  • Test
    • Events
      • Timer - Timer expires
    • Local Variables
      • LoopTotal = 0 &lt;Integer&gt;
      • TotalSpawnCount = 10 &lt;Integer&gt;
    • Conditions
    • Actions
      • General - For each integer LoopTotal from 1 to TotalSpawnCount with increment 1, do (Actions)
        • Actions
          • Player Group - Pick each player in (All players) and do (Actions)
            • Actions
              • Unit - Create 1 Unit for player 1 at Point using point facing (No Options)
          • General - Wait 0.5 Game Time seconds

If you want it to spawn simultaneously, the wait must be outside the Player Group loop - simplest solution would be to use an Integer loop to handle it. It'll spawn a unit for each player in the Player Group, wait 0.5 seconds, then repeat for the next value of LoopTotal, until LoopTotal == TotalSpawnCount
 

Shlomi1515

New Member
Reaction score
2
Trigger:
  • Test
    • Events
      • Timer - Timer expires
    • Local Variables
      • LoopTotal = 0 &lt;Integer&gt;
      • TotalSpawnCount = 10 &lt;Integer&gt;
    • Conditions
    • Actions
      • General - For each integer LoopTotal from 1 to TotalSpawnCount with increment 1, do (Actions)
        • Actions
          • Player Group - Pick each player in (All players) and do (Actions)
            • Actions
              • Unit - Create 1 Unit for player 1 at Point using point facing (No Options)
          • General - Wait 0.5 Game Time seconds

If you want it to spawn simultaneously, the wait must be outside the Player Group loop - simplest solution would be to use an Integer loop to handle it. It'll spawn a unit for each player in the Player Group, wait 0.5 seconds, then repeat for the next value of LoopTotal, until LoopTotal == TotalSpawnCount

Thank you genius
 
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