Basically, I've successfully created an AI system where a Zombie mob chases and attacks players, but I need help going more indepth. I created a door obj that players can open and close to get into a house where they can hide, Although, I need an AI function where the Zombies break down the door, but only if someone is hiding behind it. I've already tried making something like this but it failed do to my inexperience. Can someone please help? It would be much appreciated.
PS, you can't see through the door so it would make sense that the zombie would only break down the door if it knows that a player is hiding behind it.
![]() Aug 4 2013, 7:34 am
|
|
Using step() to move the zombie towards its target, you can make it so that if it Bump()s into a obj/door, it sets the door to its new target. Then once the door is destroyed it'll look inside for a new target to chase and if they're long gone, give up and go eat a duck or something i dunno.
|
100% untested but the logic is there. Also not commented nearly enough but if you have questions on anything I'm here to halp.
world |
Awesome, I'm on my phone right now. When I get home I'll attempt to adapt that with my code. Thanks again.
|
Works great! Just tested it, ran behind a door and it worked. Thank you very much.
|