Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Sprite Speed help

Author
Message
Scottishdemon
10
Years of Service
User Offline
Joined: 6th Jun 2013
Location: Scotland
Posted: 6th Jun 2013 12:49
Hey guys. This may or may not be the right place to ask about this, but I was hoping people could give me some general tips for slowing down the sprites. I'm currently doing a project for college but can’t seem to slow the sprite down I have set it to: (SpritenameVelocity.Speed = 1) I have also tried to change it down to 0.1 but this seems to stop the sprite if anyone could help I would be very grateful
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Jun 2013 10:38
Make sure that your sprite variables can use floats, otherwise you won't be able to have speeds like 0.1. It sounds to me like the speed variable is an integer, or if you use X Y position variables, they might be integers.

Even though the sprite is locked to integer screen locations, you still need to use floats.

I got a fever, and the only prescription, is more memes.

Login to post a reply

Server time is: 2024-04-19 08:42:25
Your offset time is: 2024-04-19 08:42:25