Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

2D FOLLOW AI

I was hoping for someone to really help me here. I have an enemy who is supposed to follow my player. So I created two variables the follow distance and catchdistance. The followdistance allows the player to be able to continue running but the enemy is still following but when the player reduces the speed and the distance reduces to the catchdistance then player death/GAME OVER/enemy caught animation. (Almost similar to Subway surfers but in 2d)


PROBLEMS

1. The player is still movable after being caught/GameOver

2. The enemy does not follow the distance guideline as explained (if when catchdistance is less than the followdistance then caught the player/GAMEOVER/caught animation) (else if the followdistance is greater switch to follow animation and follow the player)


Here is my Code


Sign In or Register to comment.