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

Im making a Maul (Tower Defense), Simple question about blocking

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2012
Messages
16
Ok im making a maul wich is a tower defense that players can build freely on the monsters running course. so my question is how would i make it so that if the monsters path is blocked by a players tower (on purpose to where they cant go any farther on there path) then the monster will attack a players tower, but it can only attack it if the path is blocked.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Well Im no expert in tower defense but my first idea is to let an invisible unit check the path before the actual spawn. If it can not pass the actual spawn attacks.

Or register for every unit the distance it moved from time to time, if the distance is very small it means it is blocked so order it to attack something.

There might be an easier way though..
 
Status
Not open for further replies.
Top