The enemy begins to move when entering the scene (resolved)

hello. I would like to know if there is a way for the enemy, upon entering the scene, to start moving. Because if, for example, I place my enemy on the map in a distant way, and he would be near a well, he would fall before my character reaches that scene.

There I would like it not to animate outside the red box, but when it enters the box, it does animate there.

cap1

here is the goomba animation code

I think that’s usually handled with an aggro sphere. Basically, place a collision volume around the enemy, and they’ll start pursuing you once you enter it, and stop once you’ve left it.

1 Like

Thanks for responding but it does not have artificial intelligence. Could you explain to me with graphics, because I am somewhat new?

very lost, if you can help me I would appreciate it

I think that’s usually handled with an aggro sphere. Basically, place a collision volume around the enemy, and they’ll start pursuing you once you enter it, and stop once you’ve left it.

Yes, but I repeat, my enemy does not have artificial intelligence. It just moves forward and backward. like mario’s enemies

Sorry, haven’t been checking in on this. Have you solved your issue yet?

Fundamentally, the concept does not require your enemy characters to have artificial intelligence. Just place a large collision box or collision sphere around the character, and set up their movement logic to activate when it’s overlapped and deactivate when it’s no longer overlapping.

boxcollision01

In this example, I’m using a Timeline set on Loop to move the enemy pawn, so no A.I. required. There’s a Custom Event to activate the Timeline, and a Custom Event to stop it, all triggered based off of whether the Player is within the collision volume (ignore the fact that I used the capsule collision in the example; it should be your aggro volume/collision box/sphere/whatever)

1 Like

thanks for the tutorial. I’m going to try it and let you know the results.