Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Hspeed Slow down, Slowing down Hspeed
United States
kremling
Posted: Jun 14 2007, 02:42 PM
Quote Post


Casual Member
[*][*][*]

Group Icon
Group: Members
Posts: 923
Member No.: 3240
Joined: 28-January 07

Status: (0d) [--]


How would you make the player gradually slow down when releasing a button, example..

CODE


if (keyboard_check_released(vk_left))
{

hspeed=-.1
if hspeed=0{
hspeed=0
}}


I know this is wrong but can someone help me?

This post has been edited by kremling on Jun 14 2007, 02:42 PM


--------------------
My Reference_1
Deviant Art
"Doing the wrong thing is always right"
Drawings by mfggers: Omnomlicous - Jazz - Bip
user posted image
PMEmail PosterUsers Website
Top
Finland
Ultramario
Posted: Jun 14 2007, 03:02 PM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


By adding friction. Good value would be in between 0.1 and 0.5

Simple as that.


--------------------
PMEmail PosterUsers WebsiteAOL
Top
United States
kremling
Posted: Jun 14 2007, 03:10 PM
Quote Post


Casual Member
[*][*][*]

Group Icon
Group: Members
Posts: 923
Member No.: 3240
Joined: 28-January 07

Status: (0d) [--]


Thanks UltraM.


--------------------
My Reference_1
Deviant Art
"Doing the wrong thing is always right"
Drawings by mfggers: Omnomlicous - Jazz - Bip
user posted image
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0348 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 2.63 ]