• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Spawn random creep

Status
Not open for further replies.
ok first off this is quite simple,

RC is just a integer
CS is a unit type array.

Untitled Trigger 001
Events
Map initialization
Conditions
Actions
Set CS[1] = Peasant
Set CS[2] = Footman
Set CS[3] = Knight
Set CS[4] = Rifleman
Set CS[5] = Mortar Team

Untitled Trigger 002
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Set RC = (Random integer number between 1 and 5)
For each (Integer A) from 1 to 5, do (If (RC Equal to (Integer A)) then do (Unit - Create 1 CS[(Integer A)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing))

ok oviously u wont use the same units and it will be more than 5 u might not spawn them in the center they might not be reds but it gives u a general idea.
 
you will have to put them all into ur array. so if there is 100 ur array will be 100 long.
 
Status
Not open for further replies.
Back
Top