• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

TD Style enamy spawn

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
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