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

Zone where units are respawning

Status
Not open for further replies.
Level 2
Joined
Nov 6, 2011
Messages
18
Hello, this is my first post here, i wanted to ask one question about world editor. How to make a zone where units are respawning, example: In whole map units are not respawning, but you teleport to the fighting area, there you can lvl up and get gold or lumber from bounty reward and if you kill someone (Stone golem, infernal etc.. Neutral hostile monster) it will respawn in some time. But respawn would be only in that zone, in whole map Neutral Hostile units are not respawning. So if anyone know how to do this thing i would be very thankful for reply. Sorry if i did mistakes because im from other country and my english skills are not perfect. :vw_wtf:
 
Level 6
Joined
Dec 9, 2008
Messages
233
1. Make a region where your arena is
2.Make a trigger called respawn

Events
A unit owned by neutral hostile or whatever dies
Condition
Boolean condition - YourRegion contains dying unit equal to true
Action
You can put wait action if you want your creeps to respawn after some time
Unit - Create 1 unit-type of dying unit for neutral hostile at position of dying unit facing whatever number you want between 0 and 360.
 
  • Creep Spawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Test Region <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • Wait 1.00 seconds
          • Set p = (Center of Region Spawn Location <gen>)
          • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at p facing Default building facing degrees
          • Custom script: call RemoveLocation (udg_p)
        • Else - Actions
System is leakless and MUI.

I added 2 regions to show you how it work (test map).
But if you want to use more than 3 or 4 spawning locations store region into array so you can use simple for function instead "god know when ending" if function.
 

Attachments

  • test map.w3x
    18 KB · Views: 39
Status
Not open for further replies.
Top