to manage enemy knockback you recommend me to use variables with the bounce given by the tween behavior as in this case:
![]()
or use forces directly as in this other case?

I would like to point out that in my game enemy waves are continuously created and I wanted to know which of the two solutions could be less burdensome to manage.
It does not need to happen in your game
But just so you have idea why you want to go with FORCE
Imagine your enemy is knockback into the wall
Is it top down or platformer does not matter
BUT with forces you can use separate enemy from wall to not allow enemy to go trough wall
While still allow enemy to be affected by knocback
For example enemy is thrown diagonally top left
And there is wall on left
Enemy will stop on wall
But will still fly up as long as force is applied
With tweens you would need to stop tween
And either that would be end of the story
OR apply force UP
But imagine detecting into which direction apply force if same case would be in knockback into different direction
EVEN if i would not need to stop enemy on wall
I would pick force
Just for sole reason above example proves it more flexible
I tend to use an instant force linked to an object number variable that counts down if above zero or use an object timer rather than use a tween.
edit mainly for the reasons zero mentions
ok thanks for the explanation and the advice @ZeroX4, I proceed with forces to push the enemies.
One last question… enemies move towards the player always using their strength and I was wondering if using a permanent strength would be good for repelling attacks.
@petlimpet suggests using an instantaneous force connected to a variable.
can you give me an example please?
If I use an instant force the enemy’s recoil will not be noticeable because he is already pushed by a force towards the player.
if this is okay for you I’ll continue as I was doing:

You need to add variable to control state of enemy
Make text var for enemy
And if that variable is set to approach then add force to enemy toward player
If its knocback then you do your knocback logic and so go on
Hi If it’s working for you doing as you’re doing it then stick to that. I tend to always use an instant force linked to a number variable
eg if ‘force’ of enemy >0 then move enemy with instant force at enemy.forceangle with enemy.force*30 and enemy.force subtract 1
You might need to use for each doing it this way.
i would use the enemy.force=0 condition to turn off whatever to making the enemy move toward the player