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

TD Style enamy spawn

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
You need to firstly plan what wave style you want. A typical one would be a sort of wave interpreter where you have a itterative timer system that moves through a list of waves spawning units based on data for that wave. Less typical ones might use buffs to improve a smaller pool of spawns to be stronger at higher waves.

Generally the attacking of hero units is not so much a problem. You just order them to attack the point under the hero and they will automatically attach anything they come across. If they are to only attack the hero then you order them to attack the hero directly. If they are ordered to attack a point and the hero continiously moves, then simply reissue the attack order every so often.

In any case, you will likly want to use an itteratice event (one which fires perodically) to spawn the waves. For efficiency it is best to avoid hard coded waves (where type constants are used directly with function calls) and instead use an array system where the waves advance the array referenced.
 
Status
Not open for further replies.
Top