Snap! 6.3.7 Build Your Own Blocks

Im stuck on why i cant get my sprite to be idle when not moving and do the move animation while moving. Also, i cant get the sprite to jump and walk at the same time. I would greatly aprrectiate the help!

First of all, welcome to the forums!

Your problem is that instead of using broadcast [ v] and continue what happens with the key presses or using a when <key [ v] pressed?> or when key [ v] pressed, it does what happens on the keypress, then checks the next key, and if it is pressed, the script goes and finishes, and if it is not pressed it checks the next key.
to solve it, use the do in paralell and wait block from the parallelization library, broadcast a message (do not use the broadcast and wait use the regular broadcast) or use a hat block.

No, that's not the answer.

What you need to do is remove the forever block from idleAnimation.

(P.S. Snap! is a real programming language. You can call your procedures things like idle animation (more than one word) and make your code easier to read than the style you learned in that other language.)

welcome and you must one of the control blocks to get you sprites to do anything if you want it too

There is a modified project
Jump action is separated from the main loop.
platformer boy script pic (2)

Animation procedure switches between every costume named as action +(?).
platformer boy script pic (3)

There are a few step by step tutorials for Scratch, made by griffpatch, directly applicable to Snap!

thanks everyone for the help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.