• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

~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