• 🏆 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!

Creep spawn help

Status
Not open for further replies.
Level 6
Joined
Sep 27, 2008
Messages
258
Ok so i am trying to make a spawn system for creeps and i just don't know how to even start

what i am trying to do with how they spawn is like this

Early game-Tier 1

Level-1 creep spawns

time passes

Level-5 creep spawns

time passes

Level-10 creep spawns

this loops for so many minutes in the game then it upgrades

Mid game-Tier 2

Early game-Tier 1

Level-15 creep spawns

time passes

Level-20 creep spawns

time passes

Level-25 creep spawns

this loops for so many minutes in the game then it upgrades

Mid game-Tier 3

Early game-Tier 1

Level-30 creep spawns

time passes

Level-35 creep spawns

time passes

Level-40 creep spawns

this loops for rest of the game
but i can't figure out how to do it so any help would be nice
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You could do it with a few variables and a timed trigger.

Variables:
  • Unit-type (array) "spawnType" (The unit-type that will spawn for the wave)
  • Real (array) "spawnTime" (The wave will spawn after this amount of time has passed)
  • Real "timer"
  • Integer "currentLevel"
  • Point "tempLoc" (this is only used to remove memory leaks, not part of the actual system)

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set spawnType[1] = Peasant
      • Set spawnTime[1] = 5.00
      • -------- --------
      • Set spawnType[2] = Footman
      • Set spawnTime[2] = 15.00
      • -------- --------
      • Set spawnType[3] = Knight
      • Set spawnTime[3] = 25.00
      • -------- --------

Spawn units:

  • Spawn Units
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set timer = (timer + 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • timer Equal to spawnTime[(currentLevel + 1)]
        • Then - Actions
          • Set currentLevel = (currentLevel + 1)
          • Set tempLoc = (Center of (Playable map area))
          • Unit - Create 1 spawnType[currentLevel] for Player 1 (Red) at tempLoc facing 0.00 degrees
          • Custom script: call RemoveLocation(udg_tempLoc)
        • Else - Actions
Of course, this will only create 1 creep per 'wave'.
The problem is that you didn't specify anything else, so if you want creeps to spawn in intervals (spawn 1 creep every second, as long as the wave is active), or spawn them all at once, spawn them at different locations etc.
I won't guess which of those you want, it would drain too much time if I was wrong.

So if you need anything else, I can adjust the system, as long as you specify it clearly.
 
Level 6
Joined
Sep 27, 2008
Messages
258
To rysnt11 game time

to ap0calypse

will that let 3 units spawn per tier or just 1 per tier?


if you played angle arena i wanted the spawns to work like those
 
Status
Not open for further replies.
Top