Scratch ENEMY AI | Top Down Shooter (Ep. 2/2)
Вставка
- Опубліковано 27 чер 2024
- In this Scratch tutorial, I show how to finish the top-down shooter by adding enemy AI that chases the player!
📺 First Top-Down Shooter Video: • Scratch Top Down Shoot...
🎮 Get The Game's Assets: scratch.mit.edu/projects/6788...
Thanks for watching! Please hit the like button and subscribe for future Scratch tutorials!
🔗 LINKS:
Scratch Profile Page: scratch.mit.edu/users/ShiftCl...
Night Ninja Scrolling Platformer: • Scratch | Scrolling Pl...
Cat Clicker tutorial: • Scratch | Cat Clicker ...
Tower Defense tutorial: • Scratch | Making a Tow...
How-to tutorials: • Scratch | How-To Tutor...
Get Scratch Addons: scratchaddons.com/
🧾CHAPTERS:
00:00 - Intro
00:24 - Enemy Spawning
01:46 - Camera Movement
02:31 - Repositioning Enemies
03:06 - Enemy Movement
05:33 - Enemy Collision
07:16 - Enemy Health
10:30 - Score Stuff
11:58 - Particles
14:37 - Outro
❗ DISCLAIMER:
This video is family-friendly! Hostile and/or rude comments will not be tolerated!
Thanks for watching! Make sure you watch the first top-down shooter game episode! Here's the link: ua-cam.com/video/qC8od4vpN44/v-deo.html
can i play the final results???????
Keep up the tutorials! Your content is amazing and well edited :)
Thanks for the tutorials! Didn't come here to code this game but helped me know more so I can implement these features into my projects. Keep up the good work!
Glad I could help! Thanks! :D
@@ShiftClickLearn :D
I've been waiting along time for this video😍
Awesome!
Me : *not motivited in Scratch*
Shift Click Learn : *Posted a new video*
Me : BACK TO SCRATCH!
XD Thanks!
I have been looking for a video like this thanks now I can continue making a top down game ❤
Keep making tutorials! You're the best!
Thanks, will do!
I loved this episode its so cool and easy I always watch you.
Thank you! :D
LEZ GGOOOOOOO NEW VID
Your tutorial was awesome, but I have a question is the Movecamera custom block run without screen refresh or not?
That's awesome!
Thank you!
Keep up the good work!
Thanks, will do!
I have bug i encountered that the enemy hitbox doesnt work they still merge into eachother and stops moving,its not noticable in your game becuase the enemies are just squares with the same color but in my game they have actual costumes so its very noticable
My bad but I went back to try and your this tutorial because it was like the first thing I tried just to get the hang of it that I saw to mess up scratching it was a bad.. but now I've actually made it work cuz I got a little bit more knowledge but I am having a problem still with the switch of the icon but big thank you big big help your back you're the best
Scratch Speedrun lol i like that you code fast though other youtubers are so slow i have to skip some of the video to actually start coding
LOL, awesome! It can be hard to find a good pace to record- on one hand I don't want to go really fast because people wouldn't be able to follow, but if I go really slow, the video will be 1000 hours long xD. Thanks for the comment! :D
Hey, idk if the enemies are supposed to be stuck together or not for collision, when i made collision they are just stuck together or not. Very good tutorial. It helped me learn new movement and all
Hi, I watched but I forgot to comment!!!
awesome thx!
You're welcome!
awesome tutorial
Glad you liked it! :D
AWSOME
imma shot the like button
lol
@@ShiftClickLearn xd
Amazing :D
Thanks! 😄
Late night right now. Seeing this vedio 2 hrs after upload
Awesome!
Very helpful! But, what if I have different enemy types? How would the collisons work for the different sizes and shapes?
is possible to do that the bullet goes offscreen and damage the offscreen enemies?
Just finished watching part 1 and realized this was uploaded a few hours ago lol
Lol awesome!
100/10
good video:)
Just a little curiosity, how do u make the enemies shoot bullets and stuff. I kinda need tht tutorial honestly
Ooh, that would take some math for sure, similar to the move steps custom block... That's a good tutorial idea! Thanks! :D
thank you
You're welcome!
Whenever I get close to an enemy, to enemy it glitches side to side. Is there any way to fix it?
Hello my friend. Video hay quá.
Hiii1
quick question - Like you made a move block that works with scrolling can you give me code for gliding block that works with scrolling?
I love you videos!!!!!!!!!!!
Thanks!!! :D
you got it! :D
Got what?
@@ShiftClickLearn watching the first video.
I have a solution for Enemy Collisions, make a variable, name it MYSELF with the name of the sprite, and inside the touching (…)? Block, put the variable in the string input.
Woah, will that work? I'll look into that! Thanks for the tip! :D
I tried it and the enemies were still colliding but they were also still chasing me.
I found a problem in the collisions, if the sprite was a circle the collision code gets buggy like i saw some enemies overlapping each other, is there any way of fixing this?
Hmm, maybe try making the collision detection costumes curved as well? I'm not sure if that will work tho...
It kinda work I just need to update the collision code I guess thanks!
the particle script doesn't work when I kill a monster in my game the particle spawn somewhere else and does not do that cool explosion effect
YES
awesome content! keep it up.
Thank you, will do! :]
coolio
can you make a tutorial on particles coming from dead clones. i am trying to make a zombie shooter game and i want to add some polish, but these particles don't work for me as i have a fixed camera and not a moving one like you.
Did you try hiding the clone then creating the particles?
@@ShiftClickLearn my particles are working just fine now. i had to teach myself how to use lists, but now they seem to work. if you could make a tutorial on particles without a scrolling background that would be amazing.
When I make the minimum size the enemys become big how do I fix that?
I hope you add multiplayer it would be fun!Or you can do a other tutorial
agree
That would be really cool and also very complex!
@@ShiftClickLearn yeah a couple of tutorials but you dont have to I hope you do great vids :D
Or maybe a co-op
@@qwertyuiopasdf160 i mostly want more than two people though
@ShiftClickLearn Whenever I Shoot A Enemy All Of The Other Enemies All Get To The Same Size As The Enemy I Shot, Is There Any Way To Fix This?
Ooh, did you make the health variable for this sprite only? Otherwise, ALL of the enemies will share the same health variable.
Yes Got It Working Thanks For The Advice (I Love Your Vids Btw My Favs Are The 1 Episode Game Ones!)
Little bug: If you go all the way to the left or right or any direction that are far away from spawn, enemies will spawn really far to you
I think to fix this, you need to set the x and y spawn that pick random from the player current x and y
Oh, that's a good tip!
@@ShiftClickLearn thanks :D
yoo bro whenever i move the the enmy changes back to false why does that happen
question: if i were to make a wave based shooter using the same scripts, would it function the same?
Yes, I just did that
super helpful, but I still can't manage to add wall collision. Any tips?
I would first remove the movement from this game and replace it with the movement from the wall collision tutorial! :D
@@ShiftClickLearn yeah, the movement in this tutorial is made to be a bit more smooth, would the movement from the collision tutorial still work with everything else (enemies, bullets...)
Hey can you make an RPG series tutorials
That would be really cool! I have something else planned tho... ;D
Can you make one for something similar to 20 minutes till dawn
The bullets when i shot it kept going up so I made the speed different and steps but thanks for this i keep wanting to learn
indeed very nice i thought im not gonna make it because the bullet didn't come out of the gun it just gone over it but i just realized i have to change the direction of the bullet to 0 the it come out of the gun
HEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE GOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!
nice....
you should make a studio like griffpatch for the project
That would be cool...
Hey you don;t have to do this but I would like it if you made a video where if there is a object in the enemy ai view then they won’t follow you
Time to copy-paste and change the texture and call it my game
lol...
please give credit tho xD
@@ShiftClickLearn sure lol
Would it be possible to make a scratch shooter game where the enemies shoot at you without needing a ton of sprites?
There aren’t many sprites 💀
But yes. It would be possible.
I mean like making the enemies bullets all clones that come from cloned enemies, sorry for the confusion and thanks for replying @@parkerdedrick8967
When i tried to make enimes move they stay still please help
Can someone tell me how to make the enemies smaller?
this was really good but only 1 enemy was moving with the camera
I copied the code for camera movement but it doesn't seem to be working. anyone got any tips?
IDK its the same 4 me
How can you add wall collision in this?
I have a tutorial on wall Collison! You'd basically replace the movement shown in this video with my other tutorial. Here: ua-cam.com/video/OmRh6SXoI0Y/v-deo.html
Thanks
5:45
can anyone help?? the icon stuff for the enemies isn't working
please i have to submit this tomorrow for my final
Does not work my enemies keep spawning on my player 4:48
the "costume" code wont work correctly
HOLA!!!!!
HELLO!!!!! :D
a small bug: the enemies still collide with the offscreen enemies
my scrolling is not working Please help me
THE GUN IS STUCK WHEN I GO TO LEFT OR RIGHT
430 viewvs 7 hrs ago Ayo 😳
😳😳😳
The enemies aren't following me, explain please...
Did you copy the Move "steps" steps block correctly? (This one: ua-cam.com/video/-XgHyWNaxtk/v-deo.html )
@@ShiftClickLearn, Yes. I did...
I found I little bug, that is enemies can get stuck from icons, I think because they are in the same sprite.
Yeah, at the moment my enemies are also stuck as icons, Scratch must've had an update that changed something
Good tutorial but if you could do it a little slower that would be much apprisheated
Add recording system or bad
0-0 lol
good idea
@@ShiftClickLearn It is actually easy, for player just store every single move and shoot for enemy store enemy type and time when enemy spawned. And for playing recording just disable moving skript and enemy spawn loop, moove player according to list and spawn enemy according to its list. Enable other game loop skripts
61th veiw and 13th like
Thank you! :D
29th like
thanksssss
hi
helloo
This video cuts a lot, I couldn't catch up most of it.. Hopefully, you fix this..
Your Tutorials Are Really Good But Can You Speak Slowly.
Thanks! Sorry about that- if you need, you can slow the video down. (Settings > Playback speed > 0.75 or 0.5)
@@ShiftClickLearn Thankyou
wwooooowww i'm commenting on my own videooooo
bro went to fast i messed up my whole project and cant fix it
Same.
Bruh, there is one more like until it is 666😂😂😂
69 not op
aHHhh
The enemy's still stupid tho
hard please easier
😠
This is very laggy
I always click on dislike even tho i love it :/
wHY 😭 XD
Bad tutorial. Went too fast. All the enemies spawn in a line and won’t move when I move. All bc you rushed.
I am dissapointed. You are lying. Is not working and link for game is not real.
Me seeing 10:44
Take the number counter from the backpack (made by griffpatch, go check him out) and got the job done, 100% center!
Griffpatch's number counter is good! (You could also use mine hehe.) :D
@@ShiftClickLearn I will use yours cuz this is your game :D