This enemy follows the player, when colission with the HITBOX_PLAYER, it stop and make an attack animation on place inside the “attack” timer, so it last 1 second on place.
Now i need to add the charge sentence (enemy throws itself to the player), im trying with force but i cant reach the goal that i want.
-The hitbox follows the player position, so if i dodge and and the enemy is no longer inside the hitbox i want it to continue with the charge attack.
-When i use force to an object or position (player), the enemy will try to charge but until the position of the object, how enemy can pass trough the player? for example a charge attack with 200 pixels long with direction to the player.
Player is in some distance to enemy
Enemy moves toward player with accelerated speed and when he is next to him he perform attack like throw a punch
Or to be exact like shooting arrow into target
Instead you want enemy to become human cannon ball which pass trough player?
If so then
Condition
Again whatever you want here when enemy is ready to charge
Action
Change animation of enemy to charge attack
Apply force to enemy toward player
Another event
Condition
Enemy in collision with player
Action
WAIT 0.5 sec (change how long to your needs)
Remove all forces from enemy
And be aware if you want to enable pahtfinding again you need to activate it again via another evnet
For example if distance to player is above 100 pixels