My character keeps nudging

Non-platform specific questions.

My character keeps nudging

Postby Waluigiftw » Sat Sep 25, 2010 4:14 am

Hello everyone
I just want to say this now: im a total noob at game making
anyway i need some help. whenever my main character stops moving he keeps nudging to the left or right just by a small amount but its really annoying.
i dont REALLY need to fix this id just like to know why it does that. if it can be fixed plz tell me how. :roll:
ive got the event to repeat while colliding and its only on the top side heres the picture :arrow:
Attachments
bitmap1.png
User avatar
Waluigiftw
 
Posts: 61
Joined: Mon Sep 06, 2010 2:49 pm
Location: Fox lake
Score: 3 Give a positive score

Re: My character keeps nudging

Postby DST » Sat Sep 25, 2010 4:42 am

You have to take his energy away...

player>draw actor>
Code: Select all
directional_velocity*=.99; //slows him down (basic friction)
if(directional_velocity<0.1){ //stops him if he is close to not moving at all)
directional_velocity=0;
}
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: My character keeps nudging

Postby Waluigiftw » Sat Sep 25, 2010 11:55 pm

Thank you sooooooo much its working ... no nudging!!
If you'd like to see the finished version (idk when itll be finished)
check out my site
http://www.macheeseygames.webs.com
User avatar
Waluigiftw
 
Posts: 61
Joined: Mon Sep 06, 2010 2:49 pm
Location: Fox lake
Score: 3 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest