Discuss Scratch

cyclerdtX
Scratcher
13 posts

how to add a walking animation to your script

plz help with this
game_pr0grammer
Scratcher
500+ posts

how to add a walking animation to your script

use the next costume or set costume block
cyclerdtX
Scratcher
13 posts

how to add a walking animation to your script

you noob that is not what i meant what i mean is that how to make a sprite that changes costume every .50 of a second when it is move and has a separate costume for jumping im meaning like the scratch cat for the sprite to do it plz help
deck26
Scratcher
1000+ posts

how to add a walking animation to your script

cyclerdtX wrote:

you noob that is not what i meant what i mean is that how to make a sprite that changes costume every .50 of a second when it is move and has a separate costume for jumping im meaning like the scratch cat for the sprite to do it plz help
No need to be rude - you didn't give enough information in your first post so that's why the first response wasn't relevant.
chanda-panda
Scratcher
1 post

how to add a walking animation to your script

I have a fully functioning walking animation on my project. the script called “tutorial” has helpful comments on it (made it for you)! Check it out here: https://scratch.mit.edu/projects/261931062.

Last edited by chanda-panda (Nov. 24, 2018 16:33:23)

solar_sausage
Scratcher
100+ posts

how to add a walking animation to your script

cyclerdtX wrote:

you noob that is not what i meant what i mean is that how to make a sprite that changes costume every .50 of a second when it is move and has a separate costume for jumping im meaning like the scratch cat for the sprite to do it plz help
easy - you make a variable. whenever you want the walk animation, set that variable to “walking.” whenever the variable is “walking”, get the costume to change:
when green flag clicked
forever
if <not <<key [w] pressed?> or <<key [a] pressed?> or <<key [s] pressed?> or <key [d] pressed?>>>>> then
set [walking] to [no]



else
set [walking] to [yes]

end
end

when green flag clicked
forever
if <(walking) = [yes]> then
next costume
wait (0.05) secs

end
end

and btw, its not fair to call him a noob, as he didn't know how skilled you were, and if i wanted, i could call you a noob too but that's not the right thing to do.
Th3_C0d3r
Scratcher
100+ posts

how to add a walking animation to your script

Here, I recently answered a similar question to yours —> https://scratch.mit.edu/discuss/post/3317033/ (Click the link to the remix project. Unfortunately this demo-project didn't have a strafing (waking) animation but the scripting is the same nonetheless.)

Or preferable refer to the original project I based it off of —> https://scratch.mit.edu/projects/108361157/#player

-Scratch On!

Last edited by Th3_C0d3r (Nov. 24, 2018 22:33:16)

Powered by DjangoBB