I'm building a small coin collecting game, where the player collects coins while stomping on enemies. I've made my main sprite some idle animations (for when he is not moving). I have also made two scripts for moving left and right. So far, when I presses D, the sprite moves to the right and stops the idle animations, which is fine. Although, when I press A, the sprite moves to the left and keeps his idle animations going.
Is there anyway to stop this? Here's a link to the project: www.scratch.mit.edu/projects/Normo/2667422
Offline
Its usually a good idea to put that all in one script.
when gf clicked forever if <key [left arrow v] pressed?> go left else if <key [right arrow v] pressed?> go right else be idle end end
Last edited by Wes64 (2012-07-11 10:15:16)
Offline
amcerbu wrote:
^^ I personally don't like this script, because if both keys are pressed, the character will move left.
Yeah.
when gf clicked forever if <key [left arrow v] pressed?> change x by (-2) end if <key [right arrow v] pressed?> change x by (2) end endTest in presentation mode.
Offline