Can set the linear velocity of the character, like dynamic?

I have an old logic bricks project and am about to reorganize it with logic nodes,encountered some problems

GIF 2023-4-13 星期四 3-3-11

GIF 2023-4-13 星期四 3-30-21

your problem is as follows - by setting the linear speed to the actor, you release the movement key, but the linear speed is maintained and extinguished gradually - it turns out that the character slides because the linear speed still affects him - there are several options - if the movement keys are released, assign the character zero linear speeds along the XY axes or use a script for this - if not key_w and not key_s and not key_a and not key_d: own.localLinearVelocity[0] = 0.00 own.localLinearVelocity[1] = 0.00 # the numbers zero and one in parentheses are responsible for the direction axis and the assignment 0.00 sets the zero speed along the axis if the direction keys are not pressed