Jump to content


Photo

When you press arrow key moving sprite moves fast


  • Please log in to reply
2 replies to this topic

#1 coryhurst

coryhurst

    GMC Member

  • New Member
  • 71 posts
  • Version:GM8

Posted 01 December 2010 - 05:35 PM

I created a 3 image sprite from a strip for each arrow key so when you press right it looks like the character is moving right, etc. However, it moves way too fast. It looks like the character is running instead of walking. I need to slow it down so that it only looks like the character is walking. I even tried executing a script and that didn't make a difference. BTW, the character also stands still facing us when the room is created and when you release the arrow key (Thats the only part that does it right). Please help and thanks in advance.
  • 0

#2 Noele

Noele

    GMC Mentor

  • GMC Member
  • 2351 posts
  • Version:GM8.1

Posted 01 December 2010 - 05:47 PM

Wherever you set the sprite image add:
image_speed = 0.3; // change to suit the animation speed you want
By default sub-images are cycled in order in each step but you can slow these down or even make them proportional to the character's speed. Note: if there are many sub-images and the speed of the character is great, GM will skip some of the sub-images, which is often what you want.
  • 0

#3 coryhurst

coryhurst

    GMC Member

  • New Member
  • 71 posts
  • Version:GM8

Posted 01 December 2010 - 09:21 PM

Wherever you set the sprite image add:

image_speed = 0.3; // change to suit the animation speed you want
By default sub-images are cycled in order in each step but you can slow these down or even make them proportional to the character's speed. Note: if there are many sub-images and the speed of the character is great, GM will skip some of the sub-images, which is often what you want.


Yup, that worked! I had it in the wrong place! Thank you ever so much! :D
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users