How to get Enemy to break wall between it and Player.

Hi, I am trying to get it so that when the enemy “zombie” is chasing me and I run behind a wall that it takes around 3 seconds for that zombie to break the wall. How would I do this? Would I need to put a Health script on the wall than have the zombie do proximity damage and once that wall is in range it hurts it? How would I code that? Any help would be great thank you.

there are million ways to make this work… but before you start thinking about zombies and walls and stuff, start simple, break your project down into really simple pieces.

start with three cubes in your game. one is the zombie, one is the player and one is the wall.

Add a script to the zombie called “followPlayer”. (search google / unity for “unity3d code follow script”) Or better yet, learn to make one from scratch.

Add a script to the wall called “zombieDamage” that has hitpoints like you mentioned

Add colliders to your wall and zombie.

If the zombie “collides” with the wall then reduce the wall’s hitpoints until destroyed.

If you want to learn coding, start simple…try these unity tutorials on Youtube by quill18creates: Unity 3d Tutorial for Programmers - Part 0 - Introduction - YouTube or any other number of tutorials out there.