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

Spawn random creep

Status
Not open for further replies.
Level 2
Joined
Nov 17, 2008
Messages
35
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.
 
Level 2
Joined
Nov 17, 2008
Messages
35
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.
Top