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

Spawning and limiting numbers of unit in an area

Status
Not open for further replies.
Level 6
Joined
Jul 30, 2008
Messages
103
I'm a WE beginner,and have a very weak triggering skill.So,I'm here to ask that,is it possible to make an area spawn unit when another unit is entering that area and keeping spawning until reached the number of limit?
so that no "respawning" of unit is needed?
My idea is to replace the "unit respawning" so that i no need to place any unit at that area when the map is initialed.
Sorry for my bad english
+rep for who ever replied
Thanks~
 
i think this is what u want but plz explain better.
  • unit enter region
    • Events
      • Unit - A unit enters No region
    • Conditions
    • Actions
      • Custom script: local location udg_tempPoint
      • Custom script: local integer udg_tempInt
      • Set tempPoint = (Center of No region)
      • For each (Integer tempInt) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at tempPoint facing Default building facing degrees
          • Wait 1.00 seconds
      • Custom script: call RemoveLocation ( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
this will create 10 units at a region when someone enters that region but it will wait 1 second between spawning the units.
 
Level 6
Joined
Jul 30, 2008
Messages
103
Alright,or i should saying in this way
A region,there's unit on it when the map initialed,it will respawn when get killed,within 30 sec.
if there's no unit is placed when the map initialed,how i'm i going to do the same outcome as above.



i think this is what u want but plz explain better.
  • unit enter region
    • Events
      • Unit - A unit enters No region
    • Conditions
    • Actions
      • Custom script: local location udg_tempPoint
      • Custom script: local integer udg_tempInt
      • Set tempPoint = (Center of No region)
      • For each (Integer tempInt) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at tempPoint facing Default building facing degrees
          • Wait 1.00 seconds
      • Custom script: call RemoveLocation ( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
this will create 10 units at a region when someone enters that region but it will wait 1 second between spawning the units.

and deathismyfriend,thanks for your method,i will try this out

Thanks for all your replies.
 
here is a trigger that respawns a specific unit like respawing a boss at the region when it dies.
  • respawn unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to bossUnit
    • Actions
      • Custom script: local location udg_tempPoint
      • Set tempPoint = (Center of No region)
      • Unit - Create 1 Footman for Player 1 (Red) at tempPoint facing Default building facing degrees
      • Set bossUnit = (Last created unit)
      • Custom script: call RemoveLocation ( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
 
Status
Not open for further replies.
Top