• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Automatically Generated Mobs

Status
Not open for further replies.
Level 3
Joined
Dec 30, 2015
Messages
33
I'm currently making a map where I need to use mobs spawning every few seconds for various purposes. I was able to create a basic version with 6 footman spawning and having them attack-move until they kill a certain mob, but is there a way to have mobs start spawning, for example, every 20 seconds after a certain amount of time elapsed?
 
Well this is an old trigger from one of my maps
hope it helps if you have verious regions made and selected in your trigger it will work
Events
Time - Every 720.00 seconds of game time
Conditions
Actions
Unit - Create 6 Necromancer for Player 9 (Gray) at (Center of Reion location 1) facing (X of (Center of Region location 2 <gen>)) degrees
Unit Group - Order (Units in Region location 1 <gen>) to Attack-Move To (Center of Region location 2 <gen>)
 
Have the periodic spawn trigger initially off (right click in Trigger Editor and turn off, do not disable). One then uses another trigger with an once off event of the desired activation time and actions to turn on the periodic spawn trigger.

Trigger: Spawn720 Activate
Event: Time elapsed 720 seconds
Action: Turn on Spawn720 Periodic

Trigger: Spawn720 Periodic (initially off)
Event: Every 20 seconds
Action: SPAWN STUFF HERE
 
The solution given by @Dr Super Good is the easiest and most logical one, but if you really have to have it in a single trigger, then you can alternatively try someting like this:

  • Events
    • Time - Elapsed game time is 720.00 seconds
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • BooleanVariable Equal to False
      • Then - Actions
        • Set BooleanVariable = True
      • Else - Actions
        • Wait 20.00 game-time seconds
    • <YOUR SPAWN ACTIONS>
    • Trigger - Run (This trigger) (checking conditions)
Or something like this:

  • Melee Initialization
    • Events
      • Time - Elapsed game time is 720.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BooleanVariable Equal to False
        • Then - Actions
          • Set BooleanVariable = True
          • Trigger - Add to (This trigger) the event (Time - Every 20.00 seconds of game time)
        • Else - Actions
      • <YOUR SPAWN ACTIONS>
 
Status
Not open for further replies.
Back
Top