トピック
Brad GamerZim

Drift Effect

Ok, so Thanks to C.Norris and Zee my first game is going good but a minor snag "drift effect" tried a few codes for a effect of speeding up and slowing down but didn't work. Any ideas for a good drift engine my was a fail.
2そうだね
プレイ済み
返信[1]
親投稿
Brad GamerZim
an idea of wht i tried was as long @spddf if button(1) then spd was spd+1 if spd>=5 then spd=5 if button(0) then spd=spd-1 if spd<=0 then spd=0 return tag on was x=x+spd
0そうだね
プレイ済み
返信[2]
親投稿
C. Norris 06495a
So when ever you press a button, something speeds up? But it doesn't have acceleration? I'm have trouble grasping the problem
0そうだね
プレイ済み
返信[3]
親投稿
Brad GamerZim
what i am looking for is a way to simulate drag force, someting gradually speeds up or slows in inervals over time, when i ran my code i got a fast speed up but no drift in the sped up direction, and exsample would be, a boat in the water doesn't just stop, it drifts to a slow and the direction of force causes the boat maintain its course. my code does not
0そうだね
プレイ済み
返信[4]
親投稿
C. Norris 06495a
Try decreasing the speed depending on how much speed is left so speed=speed-speed/(some number) the number you divide by might differ, depending on the material you drive on.
0そうだね
プレイ済み
返信[5]
親投稿
Brad GamerZim
alright thanks, been messing with a sprite on a balnk screen just running diffrent codes seeing what i can do, thinking i may need learn how to ether do a data or dimension array to jog a speed table.
0そうだね
プレイ済み