Scrolling Game Development Kit Forum
SGDK Version 1 => General Discussion => Topic started by: billybob884 on 2005-06-12, 08:52:18 PM
-
Quick question, a sprites speed is uniform through all of its states right? like theres no way (w/o scripting, thank you :) ) to make maybe a few states like 1/2 speed? The only reason I ask is becuase today i started working on a crouching state and a crawling state for the down accellerating and down left/right accel. states, and itd look a little odd to have in crawling at regular walking speed, but then again, how many chameleons do you see walking on their hind-legs? heh, i guess it really wouldnt be that odd. oh well, just curious
-
It is just animation after all... just put more instances of that frame in.
-
No, no. I meant the walking speed
-
I have two ideas:
1) You could make a global function that activates when the player is pushing down and right that teleports the player left 1 or 2 pixels (relative to where he is), and another for when the player is pushing down and left that teleports the player right 1 or 2 pixels. This should slow him down a bit.
2) Switch to another sprite definition when the player presses down to crouch. Switch back to the normal state when he presses up.
-
i may try #1, the only reason i dont like #2 is becuase when the player switches to a hurt sprite, and something changes the player again before the "timer" runs out, it always seems to screw up the change back to the regular sprite.