• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Spawning specific units depending on a specific condition. And creating a UI mass

Status
Not open for further replies.
Level 3
Joined
May 20, 2009
Messages
21
So I'm making a map, I do not know how to spawn a specific unit type. Example. Player owns a nexus would be the condition/event. Then spawn a specific unit type depending on the building, which in this case would be a zealot.
So player builds nexus, then the player gets a continous spawn of zealots at a specific point. Help would be greatly apreciated plox.

Also, if anyone can help. How would I go about setting up a massing system without having to use units, I rather use a UI box, where players can open it, then it would list in this case 7 diffrent points to mass to. The player clicks it then all units mass to it.

Edit: If anyone needs clarification on my horrible vocabularly just say so, I'm not good at explaining things.
 
The spawning could be done with data editor. First create an effect of type "spawn unit", with your specified unit type. Then create a permanent buff, set period to spawn cooldown and periodic effect to the effect you created. Then add the buff to the behavior list of the building. (you need to create an effect and buff for each unit type you want to spawn)
 
Be warned that spawning too many units at the same position too quickly will be highly demanding on the players' processor due to the displacement calculations and will result in poor playability or performance of the map. In short avoid spawning units inside tight groups of units via triggers or effects.

It is advisable to spawn units 1-2 at a time and get them to move immediatly to some gathering point to help prevent any frame dropping from occuring. This prevents too much time being spent calculating free positions for a units to spawn while still letting them gather in convenient positions.

Additionally considering upgrading spawn quality over spawn quantity if such a decission arises. Spawning 100s of weak units a minute per player may sound like a good idea for epic battles but places horriable strain on the game engine which will result in people not playing your map due to low frame rates or slow game speed.
 
Status
Not open for further replies.
Back
Top