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

Footmen Like Spawning help

Status
Not open for further replies.
Level 1
Joined
Aug 15, 2010
Messages
2
hey i'm a nit lost here how do you make a spawner like the one from footies on wc3 can some one please help me here please and thank you
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Well there are 2 ways.

The first involves the creation of a trigger system.
Each player owns 1 base. Thus give each base an array index of an array of units. There is also a spawn type for each player, a spawn rate, a current spawn rate counter and a spawn number.
Ever second you loop through all players, decrimenting their current spawn rate counter unit it is 0 in which case you spawn spawn number of spawn type units and then reset current spawn rate counter to spawn rate.
Upgrading the main structure changes the values (another trigger system) for the upgrading player. Technologies might also change the values.

The alternative is to use the data editor. You could use a perodic behaviour with the spawn effect to spawn units with a validator for a cap. You could use a spawn behaviour with maximum number of spawn positions in it. You could even use a perodic behaviour to order the main building to build the spawns.

The data editor method allows better intigration with data elements. The trigger method allows better customization and flexibility.
 
Level 1
Joined
Aug 15, 2010
Messages
2
thanks for that, would you mind mayb taking a screen shot of the layout of the triggers i learn better by pictures xD

or is there tut on this spawn, cos i can't find one all i find are the normal td spawns xD
 
Status
Not open for further replies.
Top