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

Need help turning my solo TD into a Team TD

Status
Not open for further replies.
Level 5
Joined
Jan 23, 2020
Messages
86
I have re-done my map to accommodate team play in a "Circle TD" layout, but I don't know how to implement the overrun% for a defeat condition. I understand the logic of numberOfUnits / maxUnits but I don't have the knowledge to implement it.

Map attached for reference, my attempts at this are under "pathing".
 

Attachments

I'm using my knowledge as someone who did a bit of programming in college, not an experienced map editor; just a disclaimer.


Set an integer variable, named something like unitsAlive

Every time you spawn a unit, add 1 to unitsAlive, and check if unitsAlive is greater than maxUnits. (if/then/else ; integer comparison ; unitsAlive less than or equal to maxUnits)

Every time a unit dies, remove 1 from unitsAlive.
 
It is indeed a good way of doing this.

You can also check that the food usage for the owner of the creeps is down to 0.
 
Status
Not open for further replies.
Back
Top