• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Problem! Spawn Loop

Status
Not open for further replies.
Level 1
Joined
Mar 1, 2010
Messages
1
Hi!

Im working with a Zombie invasion map for me and my friends, and im having some problems with the spawning. I dont want to do it the way with triggers for each wave.
So i tought i could use variables for changing how many spawns, and change the variable after X seconds.
Antalspawn is swedish for NumberOfSpawns and it is my variable

  • Actions
    • Set Antalspawn = 1
    • Wait 240.00 seconds
    • Set Antalspawn = 2
    • Wait 240.00 seconds
    • Set Antalspawn = 3
    • Wait 240.00 seconds
    • Set Antalspawn = 4
    • Wait 240.00 seconds
    • Set Antalspawn = 5
At the moment my trigger looks like this, but id doesnt work..

  • Actions
    • Player Group - Pick every player in (All enemies of Player 1 (Red)) and do (Actions)
      • Loop - Actions
        • Wait 30.00 seconds
        • Unit - Create Antalspawn Zombie for Player 12 (Brown) at (Center of Spawn5 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Rider for Player 12 (Brown) at (Center of Spawn5 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Berzerker for Player 12 (Brown) at (Center of Spawn5 <gen>) facing (Position of Brazier 0001 <gen>)
        • Wait 0.10 seconds
        • -------- Spawn1 --------
        • Unit - Create Antalspawn Zombie for Player 12 (Brown) at (Center of Spawn6 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Rider for Player 12 (Brown) at (Center of Spawn6 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Berzerker for Player 12 (Brown) at (Center of Spawn6 <gen>) facing (Position of Brazier 0001 <gen>)
        • Wait 0.10 seconds
        • -------- Spawn1 --------
        • Unit - Create Antalspawn Zombie for Player 12 (Brown) at (Center of Spawn2 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Rider for Player 12 (Brown) at (Center of Spawn2 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Berzerker for Player 12 (Brown) at (Center of Spawn2 <gen>) facing (Position of Brazier 0001 <gen>)
        • Wait 0.10 seconds
        • -------- Spawn1 --------
        • Unit - Create Antalspawn Zombie for Player 12 (Brown) at (Center of Spawn4 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Rider for Player 12 (Brown) at (Center of Spawn4 <gen>) facing (Position of Brazier 0001 <gen>)
        • Unit - Create Antalspawn Zombie Berzerker for Player 12 (Brown) at (Center of Spawn4 <gen>) facing (Position of Brazier 0001 <gen>)
What "loop" command should i use? Im quite used to WE but im not an expert at finding things in it, so if you know something, please tell me where to find it :)

I found something with the Integer A & B command, but didnt really understand anything of it :(

Thanks for your help!
Farfarstoffel
 
The waits are not supposed to be working on picks, either Unit picks or Player Picks. Get the waits out of the Pick and make the picks individually one after another, seperated by the waits.
  • Set Antalspawn = 1
    • Wait 240.00 seconds
    • Set Antalspawn = 2
    • Wait 240.00 seconds
    • Set Antalspawn = 3
    • Wait 240.00 seconds
    • Set Antalspawn = 4
    • Wait 240.00 seconds
    • Set Antalspawn = 5
This can be done as:
  • Trigger
  • Events
    • Time - Every 240.00 seconds
  • Conditions
  • Actions
    • Set (Antalspawn) = ((Antalspawn) + 1)
 
Level 9
Joined
Jun 25, 2009
Messages
427
The waits are not supposed to be working on picks, either Unit picks or Player Picks. Get the waits out of the Pick and make the picks individually one after another, seperated by the waits.
  • Set Antalspawn = 1
    • Wait 240.00 seconds
    • Set Antalspawn = 2
    • Wait 240.00 seconds
    • Set Antalspawn = 3
    • Wait 240.00 seconds
    • Set Antalspawn = 4
    • Wait 240.00 seconds
    • Set Antalspawn = 5
This can be done as:
  • Trigger
  • Events
    • Time - Every 240.00 seconds
  • Conditions
  • Actions
    • Set (Antalspawn) = ((Antalspawn) + 1)

Yes, the way you should do it is this way (Pharaoh's way) and try not to use waits, replace it with something else, or if you don't succeed in replacing, create different triggers (ofc this is not good ;/)

Have fun mapping, good luck with the problem

Tiche3:grin:
 
Status
Not open for further replies.
Top