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

Unit pathing (unprovoked units in TD attacking towers)

Status
Not open for further replies.
Level 6
Joined
Oct 15, 2009
Messages
107
I need help with making enemy creeps attack walls instead of running around them and trying to get to the towers. If you box yourself in with walls and put towers inside the towers will attack the creeps, causing them to run around like geese trying to attack the towers when they cant.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
You can give those walls orc's building skipes ability and set current lvl of upgrade to 1 for given player at in map initialization trigger.
Make sure you null all damage statistics in that upgrade. Walls will be dealing 0 damage to melee units but it counts as 'attacked' so units will attack them since they are in front.
 
Level 6
Joined
Oct 15, 2009
Messages
107
k ill give that ago, cheers for help.

Edit: Wait dosent that mean that they will only start attacking the walls if theyve already attacked it? Cause its damage return so the creeps actually have to attack the walls for it to work :S
 
Last edited:

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
^Better don't do that Goosebearslug.
At first, unit can't have 0 damage ;/ (minimum is 1-0 if I'm not mistaken)
Second: it forces you to waste one of attack types and change values in gameplay constants for it (null all damage dealt by it).

However, if you want 'ranged units' to focus walls too, damage should be imvolved for walls - although they will become 'mini towers' and everything will focus at them first, what ruins the concept ;/
 
Status
Not open for further replies.
Top