• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

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