Тёмный

BEST Way To Animate In Scratch 

ShiftClickLearn
Подписаться 40 тыс.
Просмотров 209 тыс.
50% 1

In today's Scratch tutorial, I show the BEST way I know how to animate with code. More specifically, I show how to switch the costumes so that they animate smoothly and without delay.
Let's get coding!
Thanks for watching! Please hit the like button and subscribe for future Scratch tutorials!
🔗 LINKS:
▶ Scratch Profile Page:
scratch.mit.ed...
▶ All Videos In This Series:
• Scratch 2 Player Tank ...
▶ ShiftClickLearn Community:
• SCL Scratch Community
▶ Scrolling Platformer (Night Ninja):
• Scratch | Scrolling Pl...
▶ Cat Clicker tutorial:
• Scratch | Cat Clicker ...
▶ Crossy Road tutorial:
• Scratch | Making a Cro...
▶ Tower Defense tutorial:
• Scratch | Making a Tow...
▶ Fish Game tutorial:
• Scratch Tutorial | Hun...
▶ Scrolling Platformer tutorial:
• Scratch Tutorial | Eas...
▶ Combat Based Platformer tutorial:
• Scratch | Making a Com...
▶ Space Shooter game tutorial:
• Scratch Space Shooter ...
▶ How-to tutorials:
• Scratch | How-To Tutor...
😸 Get Scratch Addons:
scratchaddons....
❗ DISCLAIMER: This video is family-friendly! Hostile and/or rude comments will not be tolerated!

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 312   
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Hi everyone! I hope this tutorial helped you out animating your characters! :D
@michaelchen3086
@michaelchen3086 2 года назад
Woooohooooo
@nakulojha1366
@nakulojha1366 2 года назад
thanks its very helpful🔥🔥🔥
@Geezi24
@Geezi24 2 года назад
It did for sure! Next u could make a animaiting/drawing tutorial!
@cringeman828
@cringeman828 2 года назад
yea
@naturelist
@naturelist 2 года назад
Right what I needed!
@nathanruhstofer830
@nathanruhstofer830 Год назад
You know.... I've always followed tutorials but never understood why they put the blocks here or there, but you explained how it worked and I was finally able to understand! Thanks a lot!!
@ShiftClickLearn
@ShiftClickLearn Год назад
You're very welcome, glad I could help. :D
@austencope
@austencope 2 года назад
Thank you so much for this! I was trying to make a script that makes the animation play at different speeds, and this is exactly what I was looking for!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You are very welcome!
@mibsmartlearning9621
@mibsmartlearning9621 2 года назад
its because it stays at the costume for longer
@BestBoi8
@BestBoi8 11 месяцев назад
For anyone who wants the time until the frame swaps to be consistent (not switching to walk anim1 and instantly switching to walk anim2) You can reset the _costume variable when your "if moving" variable updates (this worked for me but idk if it works perfectly in the tutorials exact code since mine is slightly different)
@jeffreygordon7194
@jeffreygordon7194 2 года назад
Great job on this. These short explanation videos that focus on a single key concept really stand out among scratch tutorials on RU-vid.
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Glad it was helpful!
@JoshuaDixon-n9x
@JoshuaDixon-n9x 2 месяца назад
TYSM! I always wanted to learn how to animate a character in a game and now thanks to you I can.
@Geezi24
@Geezi24 2 года назад
Congrats on 9k dude! You definetly deserve it! 💯💯
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thank you!!!!!
@hermanzainal2782
@hermanzainal2782 2 года назад
AH HEM. its 10 k now :D
@Rory432
@Rory432 2 года назад
Nice! I’m definitely going to show this to the guys down at my animation club!
@IceBit0
@IceBit0 5 месяцев назад
Bro has no idea how much he helped me. I got 23rd place in a game jam for kids (scratch only) , everyone's animations were choppy but mine weren't thanks to this guy :)
@kostasismename9493
@kostasismename9493 Год назад
you can use the round block to fit the entire animation in 1 single line (also you can use timer instead of a variable, which reduces file size by not alot but i thought i'd say that)
@Nightgames_YT_949
@Nightgames_YT_949 3 месяца назад
You wanna know what im planning on?
@kostasismename9493
@kostasismename9493 3 месяца назад
@@Nightgames_YT_949 ...sure
@Nightgames_YT_949
@Nightgames_YT_949 3 месяца назад
@@kostasismename9493 Im planning on to make a Fanmade Murder drone movie.With good ending.
@JustMe...12354
@JustMe...12354 Год назад
I should've looked up a video about this sooner, It would've saved me SOOOO much time. THANK YOU!!!
@lightning_rift
@lightning_rift 6 месяцев назад
this tutorial is actually the best animation i've ever seen. im doing this on a laptop and there's NO LAG.
@Wallee580
@Wallee580 2 года назад
Hello Owen! Can't wait to you reach 10K subs :p
@nikolangot
@nikolangot 2 года назад
who is owen?
@Wallee580
@Wallee580 2 года назад
@@nikolangot Owen is ShiftClickLearn's actual name, you don't think his birth certificate has his channels name on it do you? :p
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Hiya! I can't either!
@CMichaelNeely
@CMichaelNeely 2 года назад
I love animations.
@ShiftClickLearn
@ShiftClickLearn 2 года назад
:D
@N64Mario
@N64Mario 2 года назад
That's an interesting trick to use that kind of script for animating sprites, and it works for most cases. However, there are some cases when you want to animate a sprite with their own frame time value. For example, frame 1 may want to last 4 frames, frame 2 may want to last for 1 frame, and frame 3 may want to last for 8 frames. With the mod trick here, you don't have that kind of freedom because every frame is connected to a single value of the _costume variable there. Nevertheless, this a great tutorial Nice job!! :)
@jeffreygordon7194
@jeffreygordon7194 2 года назад
In that case you could just duplicate the frames. That's usually what I do. This is pretty common to see in sprite sheets in commercial arcade games.
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Good point, thanks! :D
@rlawrence678
@rlawrence678 2 года назад
I'll use these tips
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Awesome
@shahinma221
@shahinma221 2 года назад
Me when @ShiftClickLearn uploads a video : YAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYAYA(happiness)
@AnArcadeMan
@AnArcadeMan 2 года назад
Hey ShiftClick can you do a tutorial on how to make the google Scoville game. and i loved the viedo
@ShiftClickLearn
@ShiftClickLearn 2 года назад
I haven't played that game. I will have to check it out!
@shirigayamahiro6273
@shirigayamahiro6273 4 месяца назад
Thanks a lot. Im saved from depression wasted a lot of hours trying to find a way to do this. Scratch really have a confusing way to animate costume when you are a beginner. I can't use things like while, released, and some operators. Many in youtube just using 2 costume way which they just use like in The video where its not a fricking chance where I have like 20 frames for running, 30 frames for jumping and etc, it will waste a lot of space and time,even if we disregard that its also not looking smoothly. So yeah thanks a lot
@bigman8085
@bigman8085 2 года назад
Thank you so much for this tutorial
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You are so welcome!
@KIUJOONYIMoe
@KIUJOONYIMoe 11 месяцев назад
Thank you so much for this video!!!You help me to complete a animation on scratch
@Crazybros0
@Crazybros0 2 года назад
thank you so much!! ive been trying to make good animations for my new game but have always had problems with the delays. now i can have good animations :D
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Glad I could help!
@Crazybros0
@Crazybros0 2 года назад
@@ShiftClickLearn (:
@patotatoman455
@patotatoman455 Год назад
It's a great video, and it had helped me a lot. However, I have a question. I'm doing a fighting game, and for animations like Idle and walking this is very useful, however, when i'm trying to do a punch, how do you make that an animation runs just 1 time without using waits? Is it possible, or it's just better to use the old method (with waits and stuff)
@LostDeveloper871
@LostDeveloper871 Год назад
just have the total costumes to be 1 and speed to 0.
@stickinthemudstudios
@stickinthemudstudios Год назад
@@LostDeveloper871 Please elaborate.
@tolonmalabekov2684
@tolonmalabekov2684 2 года назад
COOOOOOOOOOOOOOOOOOOOOOOOOOOOL TUTORIALS !!!!!!!!!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
THAAAAANKS !!!! LOL
@Nayrlol6855
@Nayrlol6855 2 года назад
For people with the scratch addons addon i sugegs you do change costume to say broadcast 1 change costume to say broadcast 2 then right click anywhere click clean up blocks+
@ShiftClickLearn
@ShiftClickLearn 2 года назад
:D
@cosmo4q538
@cosmo4q538 2 года назад
Yes
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Yay
@geodelire
@geodelire 2 года назад
Honestly you deserve 100k subs btw i was here when you had 3k
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thank you so much!!!
@paperjoe
@paperjoe 2 года назад
Thanks! I was trying for 1 week to do this by myself and i couldn't do it. Subscribed!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're welcome! Glad it helped! :D
@minhkhoiphungtran6759
@minhkhoiphungtran6759 Год назад
Thanks man i was actually struggling on the loop problem and once i'm about to quit i came by ur video. Keep it up!
@bameyigeorge6886
@bameyigeorge6886 Месяц назад
Thank you for this video you saved my life with scratch
@SputerTheHorse
@SputerTheHorse Год назад
I usually use “When space clicked next costume” and there’s usually one sprite and I consider the costumes as “Frames” (My animations are usually simple and I copy and paste from other sprites)
@javascript7817
@javascript7817 2 года назад
Really cool! Sometimes math can save a ton of headaches!
@Mari0Kid1234
@Mari0Kid1234 2 года назад
That’s a reason I love math :)
@JointFury
@JointFury 2 года назад
Apart from when math causes headaches lol
@olympiannerd
@olympiannerd Месяц назад
This was exactly what i needed thank you!!!
@corndogthehedgehog277
@corndogthehedgehog277 2 года назад
Thanks at the first part of the vid when i did all of your code it was laggy but when i finished not anymore!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
No problem!
@gravesilk322
@gravesilk322 2 года назад
How r u so underrated??? Your tutorials are so easy to follow and you are rlly funny aswell!!!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Aww, ty!!! :D
@Hamgotnew
@Hamgotnew Год назад
i spend 20 mins trying to fix it and i just had to this video!!
@SIG7Pro
@SIG7Pro 2 года назад
Nice! I might use this one day!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Awesome! :D
@kylierodriguez7617
@kylierodriguez7617 Год назад
THANK YOU SO MUCHHHHHH I NEEDED THISSS
@terkq
@terkq 2 года назад
ShiftClickLearn, may you try making a word search scratch video ? I saw Scratch has lots of project about wordle and more... Hope my idea is helpful for you
@ShiftClickLearn
@ShiftClickLearn 2 года назад
That's a really good idea
@theorangecat1244
@theorangecat1244 2 года назад
thank you!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're welcome!
@dolliethedoll
@dolliethedoll 2 года назад
me: what a nice day to watch ShiftClickLear- wifi: hi me: nvm
@ShiftClickLearn
@ShiftClickLearn 2 года назад
LOL
@Geezi24
@Geezi24 2 года назад
Hey ShiftClickLearn could you make a scrolling backround or someting simmilar to that tutorial? i have trouble figuring out how to make a scrolling backround if the charecter follows the mousepointer! (#hope -u-get-to-10k!!!!!!!!)
@ShiftClickLearn
@ShiftClickLearn 2 года назад
That is a great idea! I'll remember that one!
@FLoriN2
@FLoriN2 2 года назад
Nice script, thanks!
@captainblues1
@captainblues1 2 года назад
That's genius, mate!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thanks a lot!
@cakesrus3852
@cakesrus3852 2 года назад
Awesome this is way to cool !!!
@moosvfx
@moosvfx Год назад
i really apreciate your help with dowloanding this software
@ShiftClickLearn
@ShiftClickLearn Год назад
You're welcome
@bennie1079
@bennie1079 Год назад
Is it really not possible to import a premade video directly into the code? Like some sort of "play animation" or "play video" that just plays the video you importeted? Does everything HAVE to be frame by frame?
@matuchuru
@matuchuru 11 месяцев назад
yep 3 months later
@annaritacapellupo5797
@annaritacapellupo5797 Год назад
working fine thank you
@ShiftClickLearn
@ShiftClickLearn Год назад
You're welcome!
@Nathan_no1
@Nathan_no1 Год назад
tysm, i remebered i had to use a mod block but not sure where you help me so much
@ShrekCOVEY
@ShrekCOVEY Год назад
Thank you for this! I need to animate a cartoon for my class.
@johandraws3166
@johandraws3166 2 года назад
Thank you SO MUCH, I needed this
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're so welcome! :D
@Username-mp8jl
@Username-mp8jl 2 года назад
I can finally make my jetpack joyride game better thx!
@ShiftClickLearn
@ShiftClickLearn Год назад
:D
@LiamGames662
@LiamGames662 2 года назад
Think you for the animation skill im gonna put you in the credits btw
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're welcome!! :D
@VibeswZP
@VibeswZP 4 месяца назад
Loved this, helped a lot with my game.
@ImKarmaHQ
@ImKarmaHQ 8 месяцев назад
I used this to make a custom block that does the switching and stuff and stuff.
@RecraftedS
@RecraftedS 2 года назад
Thank You! This is So Useful!!! :D
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're welcome Recrafted! Glad I could help! :D
@brsquadscratchr
@brsquadscratchr Год назад
ShiftClickLearn is a legend
@pinewaresoftware4247
@pinewaresoftware4247 8 месяцев назад
thank you thats the third time i needed this video
@anamoyeee
@anamoyeee 2 года назад
Nice video!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thanks!!
@jorgeanthoniohuertavazquez714
yo bro, really thankya. Big respect
@thepers0nwh0asked
@thepers0nwh0asked Год назад
pretty late to the party but thank you sooo soo much im making a top view tower defense game and this really helped thank you!
@j786friend
@j786friend 5 месяцев назад
Thanks for the help.
@Dolliestxo
@Dolliestxo Год назад
tysm this works so well but one thing i need is a running animation 😭😭
@danstevers
@danstevers 2 года назад
i love your tutorials😄
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thank you Dan Stevers! :D
@Titi-tf5uy
@Titi-tf5uy Год назад
I tried this and the idle worked amazing! but the walking doesn't seem to work. When i press d or a only one of the costumes play and not the entire walk cycle. Do you know how to fix this?
@HaleyRicks-o6e
@HaleyRicks-o6e 2 месяца назад
So there’s one way if you want to make this more hard, you just do one forever block and get the go to next costume block put it inside the forever block. And then your done ✅ but for beginners look at this video instead but for serious pros who want animations to look good do the code I said.
@Noc.3ds
@Noc.3ds 2 года назад
You are the Best! Thank you so much! 🙌
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're very welcome, thanks! :D
@arjundas2434
@arjundas2434 Год назад
This guy is a legend
@kushiboyplayz1831
@kushiboyplayz1831 2 месяца назад
Can you also make a video on how to draw each frame of a character for scratch animations?
@kushiboyplayz1831
@kushiboyplayz1831 2 месяца назад
because i have trouble with that
@lilypie5420
@lilypie5420 2 года назад
when u reach 100k subs, will u remember me?
@cheir1000
@cheir1000 2 года назад
scakekl thx sooooo much
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You're welcome!
@bernardlemay8563
@bernardlemay8563 2 года назад
Really cool! Thanks! Doesn't it mean that the animation speed is dependent on the computer speed though?
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Ooh, that's a good point! Scratch SHOULD stay at 30fps, but it could drop below. You might need to implement a delta time system!
@bernardlemay8563
@bernardlemay8563 2 года назад
@@ShiftClickLearn and just like that, you've got a new subscriber. Thanks for replying to me!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
@@bernardlemay8563 You are very welcome! Thanks for subbing! :D
@mixrockbonnie1073
@mixrockbonnie1073 3 месяца назад
Thanks a lot for this tutorial, the only problem is that on the 4 keys (arrrow keys) one's animation doesn't work
@kaytchouate1342
@kaytchouate1342 Год назад
thanks you don not know how much i wanted to do this :)
@JustPlay817
@JustPlay817 6 месяцев назад
So cool!
@RedBlast172
@RedBlast172 2 года назад
This is helpful so far!
@ShiftClickLearn
@ShiftClickLearn 2 года назад
I'm so glad 😊
@sunnytwist2871
@sunnytwist2871 Год назад
WHEN I TELL YOU THIS HELPED SO MUCH, TY😭
@MurasakiSensei
@MurasakiSensei Год назад
it doesn't work for me though..
@sunnytwist2871
@sunnytwist2871 Год назад
@@MurasakiSensei wdym, it doesn’t?
@MurasakiSensei
@MurasakiSensei Год назад
@@sunnytwist2871 nvm it works but it gets teleported to the start no matter what
@Boggothefroggo32123
@Boggothefroggo32123 11 месяцев назад
@@MurasakiSenseihow did you fix it
@yeetmeister-en8be
@yeetmeister-en8be 9 месяцев назад
im making a rpg game thank you I love your videos
@LeftyGamez666
@LeftyGamez666 2 года назад
Hey! Really great tutorial, right now I'm trying to make a top down rpg game and for it to work I need to move upwards and downwards with a walking cycle too. You think you can help me?
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You'd need to play the correct animation depending on the velocity! Something like this: if (velocityX > 0) { right animation } else if (velocityX < 0) { left animation } else if (velocityY > 0) { up animation } etc.
@LeftyGamez666
@LeftyGamez666 2 года назад
@@ShiftClickLearn It worked! Thanks bro!
@We_can_change_the_world
@We_can_change_the_world 11 месяцев назад
Thanks you're the best you just gained a follower
@gamingwithpapyrus7835
@gamingwithpapyrus7835 2 года назад
Hey, ShiftClickLearn do I give credit to you if I use this?
@ShiftClickLearn
@ShiftClickLearn 2 года назад
No, don't worry about credit! I didn't even make this algorithm, I've just seen it all over Scratch. :D
@acyssfx
@acyssfx 6 месяцев назад
Hi, nice trick. I am very new to Scratch, quick question. Will the variable eventually reach it's max value? Like in c#, an INTEGER has a max value of 32k or something. What are the variables treated as in scratch? I assume some kind of float or double if they use decimal points. Is there a max/min value of variables?
@koneenika1324
@koneenika1324 Год назад
Hi! What would you do to make it so that the idle animation faces the same way when the character moves a certain direction and stops? Thank you sooo much for this video it was very helpful :)
@viccalyn28_26
@viccalyn28_26 Год назад
you remove the "POINT IN DIRECTION Ximput x 90"
@jeenakfyd6723
@jeenakfyd6723 3 месяца назад
something wrong. my character is switching into their idle in their run
@odohjn
@odohjn 10 месяцев назад
incredibly helpful, you deserve a sub!
@hafizsabiqulhaq6041
@hafizsabiqulhaq6041 Год назад
This is helped me. Thanks
@shirou636
@shirou636 2 года назад
how do i add a i downloaded to my soft soft so i can resetup it?
@Nolifeperson
@Nolifeperson Год назад
Thx this really helped
@splatzer8240
@splatzer8240 2 года назад
Question: For the idle animation, how to you make the frame for example, go to 1-5 than go backwards, if that makes sense.
@ShiftClickLearn
@ShiftClickLearn Год назад
Hmm, try repeating the amount of costumes in the animation, change the _costume var by a positive number, then repeating the amount of costumes in the animation again, changing it by a negative number. Ex: repeat 5 { change _costume by 0.5 } repeat 5 { change _costume by -0.5 } I think this will work. :D
@splatzer8240
@splatzer8240 Год назад
@@ShiftClickLearn Its okay I found another way! But thanks for your help, sounds more effective than back a dupe of the costumeXD.
@juicebag8694
@juicebag8694 2 месяца назад
bro you can just do make a block called animate [input][animation][input][speed] and the define is repeat animation wait speed next costume
@davidakenji4746
@davidakenji4746 8 месяцев назад
i used your video on hitboxes and tried to combine it with this one but the programs don’t seem to be working properly because i’m getting no animation at all. what would be the problem?
@charlesenzotimola9073
@charlesenzotimola9073 11 дней назад
pls amke a tutorial for the walk cycle for a lot of frames
@GREYanimationofficial
@GREYanimationofficial Месяц назад
unlike you said it doesn’t work it just repeats all of my costumes to a pose of just a few pls help me
@craigonduty9274
@craigonduty9274 2 года назад
i love your videos
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Thank you!
@Fidion
@Fidion 2 месяца назад
Ty!!
@stupid40266
@stupid40266 3 месяца назад
I have a problem where I cannot animate x and y directions at the same time
@Rora2
@Rora2 2 года назад
How do i do this if i set up my movement and collisions with your other tutorial for collisions?
@ShiftClickLearn
@ShiftClickLearn 2 года назад
You would make a platformer, then just add this animation code in a loop. (A forever loop or a when I receive loop.)
@wassimgaming-ty3yo
@wassimgaming-ty3yo 4 месяца назад
nice tutorial
@Andr3G908
@Andr3G908 2 года назад
WOOOOWOWOWWWW WWOWOWOWO IM COMMENTING ON VIdEo
@ShiftClickLearn
@ShiftClickLearn 2 года назад
yay
@PecokaArasio
@PecokaArasio 2 года назад
your voice is cool
@ShiftClickLearn
@ShiftClickLearn 2 года назад
Aw, thanks! ♥
Далее
Scratch Custom Blocks Tutorial
8:21
Просмотров 149 тыс.
TOP 10 SCRATCH HACKS !
6:13
Просмотров 464 тыс.
The Most Impressive Scratch Projects
11:00
Просмотров 4,9 млн
Top 10 Scratch Games (October 2022)
18:57
Просмотров 2,6 млн
trying FLIP-A-CLIP for the first time
9:58
Просмотров 277 тыс.
I Spent 2,000 Hours Using Scratch
13:59
Просмотров 610 тыс.
I Made a Horror Game in Scratch
8:06
Просмотров 427 тыс.
This is Why Programming Is Hard For you
10:48
Просмотров 894 тыс.