~Need Help~ Simple Unitgroup Problem

Status
Not open for further replies.

nis

N

nis

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 :)
 
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.
Back
Top