• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

need help with hashtables, please

Status
Not open for further replies.
Level 14
Joined
Mar 30, 2009
Messages
971
i need help with a map. when someone can help, then ill send the map. i think hashtables are needed for this, right? well i couldnt do this myself, sadly.


basically i want one unit (town hall/keep/castle) to automatically train another unit (peasants).
i want the town hall to train only 20 peasants.
when one of the peasants dies, i want the town hall to train another one.

and
when the town hall's hp reaches 0 (or 1?) it will change owner to that of killing unit (and will have full hp)
also all the peasants trained from that town hall should convert (change owner).


the peasants can be upgraded into other unit-types, but i want those not to be counted (when peasant is upgraded into a footman, town hall will train a new peasant)
peasants cant build town halls. all town halls are pre-placed. all town halls can be upgraded to keeps/ castles.
 
Status
Not open for further replies.
Top