Enemy Behaviors: Detection and Reaction

TosanuTosanu Member, PRO Posts: 388

I am attempting to improve the challenge in my platformer run and fight game by creating more complex enemy challenges. My current goal is to make an enemy that jumps back and away if the player gets too close or attacks, so that you have to jump after it and either lead your shot or hit in mid jump.

However, although I can have the player's position tracked for the enemy to watch for closeness with a magnitude(X- Player x and y) to jump, i cannot do the same for the player's attacks. I could constrain a pair of attributes to watch its position when it fires, but that would limit the weapons in the game to one shot at a time. Is there another way to get the monster watching for something to come within a certain distance of it?

Comments

Sign In or Register to comment.