• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Neutral Spawn system

Status
Not open for further replies.
Level 6
Joined
Mar 26, 2008
Messages
239
I'm making a kind of Hero Arena map and I need a Neutral Spawn system, like in DotA or smth like that, I tried to do it myself, but for now I cannot make it, could smb help?:hohum:
I made only first spawn, but when neutrals should respawn, it works only for one region, other neutrals are not respawned...
I need either GUI or JASS, it doesn't really matter.
If it already exists, plz post a link.=)
My English isn't perfect, so if u didn't understand, I allow u to ask.:thumbs_up:))
 
Last edited:
seek DotA Template at the helper.net, there is a trigger in the map has the respawn system
i lost the map
anyway im sure it can be easily done by GUI:
event unit dies
condition own of dying unit is neutral passive/hostile
action
set point = position of dying unit/respawn location
wait X seconds
create 1 (unit type of dying unit) at point
custom script: call RemoveLocation(udg_point)

this code i made in less than a minute, for an efficient system seek the map
 
event unit dies
condition own of dying unit is neutral passive/hostile
action
set point = position of dying unit/respawn location
wait X seconds
create 1 (unit type of dying unit) at point
custom script: call RemoveLocation(udg_point)

Do not work, you should (and must) use Triggering Unit instead of Dying Unit, or another dying unit may overwrite it. Also, the point will be overwritten.

The most correct would be:
  • Actions
    • Custom script: local location udg_L = GetUnitLoc( GetTriggerUnit() )
    • Wait x.yz seconds
    • Unit - Create 1 (Unit-type of (Triggering Unit)) at L [...]
    • Custom script: call RemoveLocation( udg_L )
Have a point global variable called L too, or use the unit creation action in JASS too...
 
Do not work, you should (and must) use Triggering Unit instead of Dying Unit, or another dying unit may overwrite it. Also, the point will be overwritten.

The most correct would be:
  • Actions
    • Custom script: local location udg_L = GetUnitLoc( GetTriggerUnit() )
    • Wait x.yz seconds
    • Unit - Create 1 (Unit-type of (Triggering Unit)) at L [...]
    • Custom script: call RemoveLocation( udg_L )
Have a point global variable called L too, or use the unit creation action in JASS too...

Although working(and leak free) this is not dota like at all. In dota creeps spawn at a precise spot(center of region I presume) and not where they died.
 
You could add all units in every camp to a unit group for that creep camp. When a unit dies, check if it's in unit group 1, if not check 2, etc.
Then use the wait as in the other suggestions and create a unit-type of triggering unit at the unit groups region. Add last created unit to the specific unit group.

This trigger is going to be longer for each creep camp, but to make it cclean you could do 1 trigger for each unit group.

To make them stand at a specific point in the region you could use offsets, i believe.
 
Although working(and leak free) this is not dota like at all. In dota creeps spawn at a precise spot(center of region I presume) and not where they died.

Oops I guess I missed some parts of the post >.<

Then I'd suggest you to set each spawning point to a array variable, and then use a loop to create all the creeps at all regions...

If you want to respawn them when they die, use custom values. Something similar to:

  • For each integer (Integer A) from 1 to n do (Actions)
    • Loop - Actions
      • Unit - Create 1 creep for Neutral Hostile at SpawnPoint[(Integer A)] [...]
      • Unit - Set (last created unit) custom value to (Integer A)
This way, you'll know what's the unit's original spawn point (it will be SpawnPoint[Custom Value]).

In fact, I couldn't understand what he want very well xD
 
You could add all units in every camp to a unit group for that creep camp. When a unit dies, check if it's in unit group 1, if not check 2, etc.
Then use the wait as in the other suggestions and create a unit-type of triggering unit at the unit groups region. Add last created unit to the specific unit group.

This trigger is going to be longer for each creep camp, but to make it cclean you could do 1 trigger for each unit group.

To make them stand at a specific point in the region you could use offsets, i believe.
I tried to do it this way, I also add "If All Units Of UnitGroup Are Dead" then Actions, but it worked only for 1 camp...
Do not work, you should (and must) use Triggering Unit instead of Dying Unit, or another dying unit may overwrite it. Also, the point will be overwritten.
I'll try to use Triggering Unit in my previous trigger, maybe it will work=)
 
Status
Not open for further replies.
Back
Top