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

~Need Help~ Simple Unitgroup Problem

Status
Not open for further replies.

nis

nis

Level 1
Joined
Jan 19, 2009
Messages
1
Alright so I'm making a new map and I want 3 random units from my unitgroup to spawn in a region every 90 seconds, ill show u what i have and please help me fix it. currently no creeps will spawn.

21j9kkl.jpg



Thats 2 different triggers.

Ill go into more detail incase you're not sure what i need.


For the Unitgroup (named *Creeps*) I want to add 3 types of units to it which i did (all named *Creep Level 1*). Then I want 3 random units from *creeps* to spawn every 90 seconds (it was 2 seconds in the PIC cause i was testing it so they spawned quicker) at region *CreepSpawn1* please help. Thanks :)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Maybe this trigger will help you:

  • -------- Put this into your Initialization trigger --------
  • -------- I am using Unit Type array below --------
  • -------- N is the last creep type --------
  • Set UnitType[1] = (Unit Type of (YourCreep1))
  • Set UnitType[2] = (Unit Type of (YourCreep2))
  • Set UnitType[3] = (Unit Type of (YourCreep3))
  • Set UnitType[N] = (Unit Type of (YourCreepN))
  • Creep Spawn
    • Events
      • Time - Every X seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Center of (YourSpawnRegion))
      • Unit - Create 1 UnitType[Random integer number between 1 and N] for Neutral Hostile at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top