• 🏆 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 with creep spawn system

Status
Not open for further replies.
Level 3
Joined
Mar 6, 2011
Messages
26
Hi! I started working on a creep spawn system for my project but somehow i can't make this trigger work as I want it to do. The first problem is that I want the creeps to start spawning at 120 seconds of elapsed game time and continue spawning every 30 seconds of game time. Somehow they start spawning at 150 seconds of elapsed game time. There are other units that should start spawning at the 5th wave of creeps (270 seconds of elapsed game time) and then spawn every 5 wave of creeps (150 seconds) but somehow they start spawning at the second wave of creeps. Can someone help me to fix this?

This is the trigger that turns on the spawns:
  • Turn on Spawns
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on South Region Spawn 1 <gen>
      • Trigger - Turn on Central Region Spawn 1 <gen>
      • Trigger - Turn on East Spawn 1 <gen>
      • Trigger - Turn on South Region Spawn 2 <gen>
      • Trigger - Turn on Central Region Spawn 2 <gen>
      • Trigger - Turn on East Spawn 2 <gen>
The triggers for the other regions spawns are the same these ones:
  • South Region Spawn 1
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If: All Conditions are True
          • (Evil BuildingA 0039 <gen> is alive) Igual a True
          • (Evil BuildingB 0037 <gen> is alive) Igual a True
        • Then: Actions
          • Unit - Create 1 CreepA for Player 1 (red) at (Center of South RegionA <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepB for Player 1 (red) at (Center of South RegionB <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepC for Player 1 (red) at (Center of South RegionC <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepD for Player 1 (red) at (Center of South RegionD <gen>) facing 90.00 degrees
        • Else: Actions
          • Unit - Create 1 CreepA (Mega) for Player 1 (red) at (Center of South RegionA <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepB (Mega) for Player 1 (red) at (Center of South RegionB <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepC (Mega) for Player 1 (red) at (Center of South RegionC <gen>) facing 90.00 degrees
          • Unit - Create 1 CreepD (Mega) for Player 1 (red) at (Center of South RegionD <gen>) facing 90.00 degrees
  • South Region Spawn 2
    • Events
      • Time - Every 150.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If: All Conditions are True
          • (Evil BuildingA 0039 <gen> is alive) Igual a True
          • (Evil BuildingB 0037 <gen> is alive) Igual a True
        • Then: Actions
          • Unit - Create 1 CreepS for Player 1 (red) at (Center of South RegionS <gen>) facing 90.00 degrees
        • Else: Actions
          • Unit - Create 1 CreepS (Mega) for Player 1 (red) at (Center of South RegionS <gen>) facing 90.00 degrees
Thanks in advance for your answers!
 
For the first problem, you have a few options. You can either use:
  • Trigger - Turn on South Region Spawn 1 <gen>
  • Trigger - Run South Region Spawn 1 <gen> (Ignoring Conditions)
And that will make it work properly. Or you can simply set the event timer to 90 instead of 120. When you turn on the triggers, they will start the timers for the events, so it will wait 30 seconds before actually executing. Thus, 120+30 seconds = 150 seconds of elapsed game time. :) So you can always do this, assuming your triggers all have 30 second timers (otherwise, use the method mentioned above):
  • Time - Elapsed game time is 90.00 seconds
For the second problem, you might need to elaborate more. Also make sure that the trigger "South Region Spawn 2" is initially disabled.
 
Status
Not open for further replies.
Top