Discuss Scratch

fernando104
Scratcher
34 posts

So Im trying to make the costumes in my project move with arrow keys

Hi, I've tried making scripts for these costumes and many times had no luck so rather than leaving the scripts before, I got rid of them all because they were all garbage. I hope getting a clean slate would help you with trying to explain rather then adding on to what I said. These are my movements, {Down-Duck Costumes} {Left&Right-Run Costumes} {Up -Jump Costumes}. If you have any questions on how to do this let me know, feel free to remix for longer scripts. I hope that you understood my explanation, Bye and Thank you!
P.S almost forgot the link https://scratch.mit.edu/projects/170643452/

Last edited by fernando104 (Aug. 8, 2017 23:52:03)

-ColorMaster-
Scratcher
1000+ posts

So Im trying to make the costumes in my project move with arrow keys

fernando104 wrote:

Hi, I've tried making scripts for these costumes and many times had no luck so rather than leaving the scripts before, I got rid of them all because they were all garbage. I hope getting a clean slate would help you with trying to explain rather then adding on to what I said. These are my movements, {Down-Duck Costumes} {Left&Right-Run Costumes} {Up -Jump Costumes}. If you have any questions on how to do this let me know, feel free to remix for longer scripts. I hope that you understood my explanation, Bye and Thank you!
P.S almost forgot the link https://scratch.mit.edu/projects/170643452/
Hey, here's how I'd do it:
when green flag clicked
set [xvel v] to [0]
set [yvel v] to [0]
if <key right arrow pressed?> then
change [xvel v] by (1)
next costume
end
if <key left arrow pressed?> then
change [xvel v] by (-1)
next costume
end
if <key up arrow pressed?> then
change [yvel v] by (1)
end
if <key down arrow pressed?> then
change [yvel v] by (-1)
end
set [xvel v] to ((xvel v) * (0.92))
set [yvel v] to ((yvel v) * (0.92))
change x by (xvel)
change y by (yvel)

Just a baseball nerd with an absurdist sense of humor.

creator of more than 7 posts, each one stupider than the one before

mstone326
Scratcher
1000+ posts

So Im trying to make the costumes in my project move with arrow keys

I made this a while back with animations for my duck sprite in this example. Look at the custom block for how I created animation cycles. Also, griffpatch platform tutorial has a section on animation.

https://scratch.mit.edu/projects/108361157/

High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
fernando104
Scratcher
34 posts

So Im trying to make the costumes in my project move with arrow keys

Yes I've seen his tutorial, however didn't have much luck understanding it, using your Duck's physics I think I can utilize my expertise to create a functional animation, Thank You!

Powered by DjangoBB