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

Keeping the AI from attacking things unless persuing a Player

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
201
In my map I have a lot of hostile zombies and interesting interactive things such as doors, barricades, etc. My problem right now is since the zombies are hostile, they immediately attack all doors, barricades, etc on sight, since that is the default AI, which is bad and unrealistic towards what how I want them to behave, since they immediately strip the map of interaction pretty quick.

Is there any way to change or trigger it so that zombies only attack doors and such etc if it directly impedes their progress towards chasing and attacking a player? Like if a player is on the other side of a door, the zombies should attack it to reach him, otherwise ignore doors that aren't impeding them.

Any help with this would be appreciated.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
I am not sure but normal TDs work like this.

You build tower and the creeps run through them but if they are blocked they will attack the towers.

But they receive orders to attack a point.
Maybe you have to check whenever a unit receive an order (is passive attacking an order) whether the target is door ?
Although that might cause trouble too
 
Level 6
Joined
Aug 12, 2007
Messages
201
Alliance doesn't work since it is global, all zombies would suddenly become hostile to all doors etc, they are player 12's unit so destructible isn't a problem, its the fact that while 1 zombie is chasing 1 player, the other thousand of them start attacking doors.

Azazel has a point with the path TDs where you make mazes or whatever with your towers that they attack if they are blocked, but I haven't the foggiest how they do that, and I have s suspicion that it has to do with the fact that they are moving to a preset point and being stopped, while in my case any random zombie can go for any player, its not like there is one Region they are trying to congregate at.

Both good ideas though, I just don't think they'll work in this case. Maybe something else?
 
Status
Not open for further replies.
Top