# slowing down a velocity. (simple way) (Read 227 times)

Started by Nedflandeurse, April 02, 2021, 06:21:36 PM

#### Nedflandeurse

##### slowing down a velocity. (simple way)
New #1  April 02, 2021, 06:21:36 PM
• SlowSpriter. Even slower and limited coding skills
• A.K.A. NED
Hello.

I'm trying to code a move.

I need to have a short sliding of P1. like sliding for a short distance and stoping progressively.

Something a state with "Stand" physics would make perfectly.

But this state have to keep the "N" value for physics.

Is Velset + velmul a good combination for sliding then slowdown in a "N" physics state ?
I use to know how to use it well loooong time ago when tweaking characters, now, I'm not used to it anymore.
Thanks for any help.

[Statedef 1455]
type=A
physics=N
movetype=A
anim=1455
ctrl=0
velset=0,0
sprpriority=1

[State 1002, 1];glisse
type = velset
trigger1 = !time
x = 30;4

[State 1002, 1];freinne
type = velmul
trigger1 = !time
trigger1= animelemtime(5)<0;;;;;
x = 0.01;0.3

Custom POTS-like Kotaro WIP :
https://mugenguild.com/forum/topics/pots-kotaro-custom-ned-trying--192619.0.html And other fighting beauties in mind...
Last Edit: April 03, 2021, 07:41:55 PM by Nedflandeurse

#### DS

##### Re: slowing down a velocity. (simple way)
#2  April 02, 2021, 10:57:41 PM
Well, yes, VelMul was the first thing that came in my mind when I read the title.
As the name implies, it will multiply the velocity, so if you use anything from 0.1 to 0.9, it will slow down a little. Depending on your trigger, you can make it slow down every tick until it become 0 and the slide stops.

The code you used as example looks good, I just think the VelSet value is too high and the VelMul value is too low, but then again, I don't know how you plan to make the move. Anyway, I think you're in the right direction.

#### Nedflandeurse

##### Re: slowing down a velocity. (simple way)
#3  April 02, 2021, 11:12:04 PM
• SlowSpriter. Even slower and limited coding skills
• A.K.A. NED
Well, yes, VelMul was the first thing that came in my mind when I read the title.
As the name implies, it will multiply the velocity, so if you use anything from 0.1 to 0.9, it will slow down a little. Depending on your trigger, you can make it slow down every tick until it become 0 and the slide stops.

The code you used as example looks good, I just think the VelSet value is too high and the VelMul value is too low, but then again, I don't know how you plan to make the move. Anyway, I think you're in the right direction.

Thanks for the help.

I put a higher value first for velset for debug purposes, to see how the velmul will affect it.
Because for some reason, if I use velmul, my charcter almost immadiately stops.

But I will try more trial and error to see what kind of value could be the best.

Thanks for the confirmation, so my 15-20 years memories are not that bad ^^

Custom POTS-like Kotaro WIP :
https://mugenguild.com/forum/topics/pots-kotaro-custom-ned-trying--192619.0.html And other fighting beauties in mind...

#### DS

##### Re: slowing down a velocity. (simple way)
#4  April 02, 2021, 11:36:07 PM
The reason your character is stopping immediately is because your VelMul value is too low. Try using 0.9 or 0.8, should fix it.

#### Nedflandeurse

##### Re: slowing down a velocity. (simple way)
New #5  April 03, 2021, 03:08:00 PM
• SlowSpriter. Even slower and limited coding skills
• A.K.A. NED
Yes, I will try to tweak more.

Thanks!

Custom POTS-like Kotaro WIP :
https://mugenguild.com/forum/topics/pots-kotaro-custom-ned-trying--192619.0.html And other fighting beauties in mind...
Last Edit: April 03, 2021, 07:41:39 PM by Nedflandeurse