(Still using primarily D&D)
So I have my little sprite, right? Two images per direction, Four directions. So, eight images. Pretty simple so far. Now with the stock room speed (mine's 30) The sprite's movement speed is perfect, but the animation speed is outrageously fast. I change the room speed, as I can't find the sprite's actual animation speed, to 5. Now the animation is perfect, but it's snail's pace movement. So I go into movement speed, and up it from 5 to 15, and now the animation's perfect, the movement speed is perfect, but there's a horrid amount of lag. The sprite gets from point A to point B as fast as it's supposed to, but the process is choppy and unappealing. Any ideas?
Quick Question:
Started by KilljoyEnt, May 03 2012 02:21 AM
5 replies to this topic
#1
Posted 03 May 2012 - 02:21 AM
#2
Posted 03 May 2012 - 02:26 AM
Every time your object moves use set variable to set image_speed to 1/6 & when it stops set it to 0
#3
Posted 03 May 2012 - 02:28 AM
I'll give it a try. Not quite sure how I'd go about that, to be honest, though. Can you possibly elaborate a tad? I'm day2 new to this game maker thing.
#4
Posted 03 May 2012 - 02:35 AM
Also, there's no stopping. It's a continuous movement from the point of starting. Would this affect anything vital, in regards to setting the image_speed var to 0?
#5
Posted 03 May 2012 - 02:39 AM
Under the control tab in your object there will be a grey box that says var on it.
In your keypress events (I assume you are using keyboard to move, no?) drop it in, set the variable argument to image_speed & set the value to 1/6. leave the relative box unchecked.
In your keyboard release events add it again w/ image_speed as the variable & the value as 0, while leaving the relative box unchecked.
Edit: If there is no stopping then you can add the set variable in the create event instead. It shouldn't hurt anything vital.
In your keypress events (I assume you are using keyboard to move, no?) drop it in, set the variable argument to image_speed & set the value to 1/6. leave the relative box unchecked.
In your keyboard release events add it again w/ image_speed as the variable & the value as 0, while leaving the relative box unchecked.
Edit: If there is no stopping then you can add the set variable in the create event instead. It shouldn't hurt anything vital.
Edited by Lemon Pie, 03 May 2012 - 02:40 AM.
#6
Posted 03 May 2012 - 11:57 PM
I am using the keyboard, yes. Your solution worked wonderfully for the animation, but there is no keyboard release function to set the value to 0 on. It took a little bit of tweaking on the room speed (as I guess in my original effort to correct this problem, I edited a bunch of different factors) but everything seems to be working much smoother and visually pleasing now. Thanks for the help!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











