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

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