• 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.

Waves of creeps?

Status
Not open for further replies.

Spo

Spo

Level 6
Joined
Jun 1, 2009
Messages
122
quick question. How do you make like zombies spawn and attack you but when you kill them it waits like 5.00 seconds then am i don't know footmen start spawning how can you do that?
 
Level 9
Joined
Aug 27, 2009
Messages
473
Variables:
SpawnTimer = Timer (No Array)
SpawnTime = Real (No Array)
SpawnInteger = Integer (No Array)
ele_TempLoc = Point (No Array)

This is leakless, working and very simple.

First create this triggers:
  • Time
    • Events
      • Time - SpawnTimer expires
    • Conditions
    • Actions
      • Set SpawnInteger = (SpawnInteger + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpawnInteger Equal to 1
        • Then - Actions
          • Set ele_TempLoc = (Center of SpawnRegion <gen>)
          • Unit - Create 20 Zombie for Neutral Hostile at ele_TempLoc facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_ele_TempLoc)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SpawnInteger Equal to 2
            • Then - Actions
              • Set ele_TempLoc = (Center of SpawnRegion <gen>)
              • Unit - Create 20 Swordman for Neutral Hostile at ele_TempLoc facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_ele_TempLoc)
            • Else - Actions
Then create this trigger:
  • NextRound
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Neutral Hostile
      • (Number of units in (Units owned by Neutral Hostile)) Equal to 0
    • Actions
      • Countdown Timer - Start vk_timer as a One-shot timer that will expire in (SpawnTime) seconds
Add this actions to your Map initialization:
  • Map initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set SpawnTime = 30.00
      • Countdown Timer - Start SpawnTimer as a One-shot timer that will expire in ((SpawnTime) x 2.00) seconds
Hope you like this.. :)
 
Status
Not open for further replies.
Top