How to make inertion?

Game Editor comments and discussion.

How to make inertion?

Postby afke » Wed Mar 21, 2007 12:49 pm

I makeing car roling game and I nead to make inertion.

Car speed up step by step from speed=0 to 7 but on key up car stop .I have to make some inertion car has to slow down slowly
afke
 
Posts: 2
Joined: Sun Mar 18, 2007 1:37 pm
Score: 0 Give a positive score

Postby Caaz Games » Wed Mar 21, 2007 1:03 pm

Easy! have separate key down events that have stuff like
Code: Select all
y = y - 1;
then the next one would be like
Code: Select all
y = y - 2
but on for the second key down event put "wait for frame action" use one of your animations and put 1; then the third put 2; etc.[/code]
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby Caaz Games » Wed Mar 21, 2007 1:05 pm

then put the revers of all that on a key up event.
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby makslane » Wed Mar 21, 2007 1:24 pm

Is better use something like this:

Code: Select all
directional_velocity *= .5;
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Caaz Games » Wed Mar 21, 2007 1:26 pm

:lol: Oh, i guess that could work too. :lol:
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby afke » Wed Mar 21, 2007 2:40 pm

Thanks
afke
 
Posts: 2
Joined: Sun Mar 18, 2007 1:37 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron