• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Civilian Respawn System

Status
Not open for further replies.
Level 2
Joined
Feb 1, 2014
Messages
4
Hello Hiveworkshop. I'm new to this forum. I've been casually making maps before using resources from here but I've never made anything too serious, by that I mean something that's trigger intensive.

For my first trigger intensive map I was hoping to create a "civilian re spawn system" where units would be periodically replaced depending on the amount of unit type (civilian, guard, etc) that's alive in a specific region.

I've managed to create a spawn system with a limit of unit type for the player, but not for just one region. It is important that it is regional because I'm trying to create this grand theft auto like city map that is divided into different neighborhoods each with their own population limit.
 

Attachments

  • Triggers 1.png
    Triggers 1.png
    19.5 KB · Views: 112
Level 29
Joined
Feb 18, 2014
Messages
3,590
If you want to learn more about Respawn units? You can open some of Blizzard Maps to see how.
E.x : Rexxar's Campaign! Open one of the maps of this campaign (OrcX01, OrcX01_02...) to learn a little but it's difficult for sure if you don't know what's you doing...

You can also learn how to drop random items when a unit die....
 
Level 13
Joined
Oct 16, 2010
Messages
731
As said above, if you have no units placed in the map originally you can just spawn them all via the trigger. Add them to a unit group when they spawn (1 unit group for each region) and remove them when they die. Then you can just check how many units are in the group, if less create a new unit and add to group.
 
Level 2
Joined
Feb 1, 2014
Messages
4
So... what is the question?

Haha ok, the question is. If I you have a group of units in a region that you want to respawn every once in a while how do you make that work?

I think the suggestions you guys gave might work! I'll try it out.
 
Last edited:
Level 2
Joined
Feb 1, 2014
Messages
4
Tried it

But it wont stop spawning to the limit of 3.

Also does anyone know how to put a buff animation effects for buildings? I tried putting on devotion aura on a generator type building that gives surrounding building a 2000+ defense bonus, but it is not showing the effects on either buildings.
 

Attachments

  • Triggers 2.png
    Triggers 2.png
    21.1 KB · Views: 84
Level 3
Joined
Sep 9, 2009
Messages
658
I think you should use matching unit with that instead of triggering unit.

You might need more checks. First make a variable and set it to the max number of units a region is supposed to have. Then...do your counting check to see if the number of units matches the variable, if it doesn't then spawn your units equal to the difference between the variable and your unit count.

You can use the arithmethic function in GUI to make it look something like Unit - Create MaxNumber - UnitCount Silvermoon Guard blah blah...

Not in my PC right now so I can't use tags. But it would help if you have a variable to set the max population to.
 
Status
Not open for further replies.
Top