Scratch ENEMY AI | Top Down Shooter (Ep. 2/2)
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!
Пікірлер: 168
Thanks for watching! Make sure you watch the first top-down shooter game episode! Here's the link: kzread.info/dash/bejne/o3ds0cZtptO0ZJc.html
@Goin_VR
6 ай бұрын
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!
@ShiftClickLearn
2 жыл бұрын
Glad I could help! Thanks! :D
@gummybear4927
2 жыл бұрын
@@ShiftClickLearn :D
Me : *not motivited in Scratch* Shift Click Learn : *Posted a new video* Me : BACK TO SCRATCH!
@ShiftClickLearn
2 жыл бұрын
XD Thanks!
I've been waiting along time for this video😍
@ShiftClickLearn
2 жыл бұрын
Awesome!
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!
@ShiftClickLearn
2 жыл бұрын
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
I loved this episode its so cool and easy I always watch you.
@ShiftClickLearn
Жыл бұрын
Thank you! :D
Your tutorial was awesome, but I have a question is the Movecamera custom block run without screen refresh or not?
Keep up the good work!
@ShiftClickLearn
Жыл бұрын
Thanks, will do!
That's awesome!
@ShiftClickLearn
2 жыл бұрын
Thank you!
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
LEZ GGOOOOOOO NEW VID
is possible to do that the bullet goes offscreen and damage the offscreen enemies?
quick question - Like you made a move block that works with scrolling can you give me code for gliding block that works with scrolling?
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
Amazing :D
@ShiftClickLearn
2 жыл бұрын
Thanks! 😄
Just a little curiosity, how do u make the enemies shoot bullets and stuff. I kinda need tht tutorial honestly
@ShiftClickLearn
2 жыл бұрын
Ooh, that would take some math for sure, similar to the move steps custom block... That's a good tutorial idea! Thanks! :D
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
@ShiftClickLearn
2 жыл бұрын
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
Very helpful! But, what if I have different enemy types? How would the collisons work for the different sizes and shapes?
Whenever I get close to an enemy, to enemy it glitches side to side. Is there any way to fix it?
awesome thx!
@ShiftClickLearn
2 жыл бұрын
You're welcome!
awesome tutorial
@ShiftClickLearn
2 жыл бұрын
Glad you liked it! :D
AWSOME
question: if i were to make a wave based shooter using the same scripts, would it function the same?
@ollib9837
Жыл бұрын
Yes, I just did that
I love you videos!!!!!!!!!!!
@ShiftClickLearn
2 жыл бұрын
Thanks!!! :D
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.
@ShiftClickLearn
2 жыл бұрын
Did you try hiding the clone then creating the particles?
@DamageTick
2 жыл бұрын
@@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.
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?
@ShiftClickLearn
Жыл бұрын
Hmm, maybe try making the collision detection costumes curved as well? I'm not sure if that will work tho...
@pboltz2706
Жыл бұрын
It kinda work I just need to update the collision code I guess thanks!
100/10 good video:)
Late night right now. Seeing this vedio 2 hrs after upload
@ShiftClickLearn
2 жыл бұрын
Awesome!
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
Just finished watching part 1 and realized this was uploaded a few hours ago lol
@ShiftClickLearn
2 жыл бұрын
Lol awesome!
When I make the minimum size the enemys become big how do I fix that?
yoo bro whenever i move the the enmy changes back to false why does that happen
Hi, I watched but I forgot to comment!!!
Hello my friend. Video hay quá.
@ShiftClickLearn
2 жыл бұрын
Hiii1
@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?
@ShiftClickLearn
2 жыл бұрын
Ooh, did you make the health variable for this sprite only? Otherwise, ALL of the enemies will share the same health variable.
@ItsJustTim
2 жыл бұрын
Yes Got It Working Thanks For The Advice (I Love Your Vids Btw My Favs Are The 1 Episode Game Ones!)
thank you
@ShiftClickLearn
2 жыл бұрын
You're welcome!
you got it! :D
@ShiftClickLearn
2 жыл бұрын
Got what?
@scnhappytunes1800
2 жыл бұрын
@@ShiftClickLearn watching the first video.
super helpful, but I still can't manage to add wall collision. Any tips?
@ShiftClickLearn
2 жыл бұрын
I would first remove the movement from this game and replace it with the movement from the wall collision tutorial! :D
@zancrniveckalar2593
2 жыл бұрын
@@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...)
Can you make one for something similar to 20 minutes till dawn
coolio
imma shot the like button
@ShiftClickLearn
2 жыл бұрын
lol
@shahinma221
2 жыл бұрын
@@ShiftClickLearn xd
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.
@ShiftClickLearn
2 жыл бұрын
Woah, will that work? I'll look into that! Thanks for the tip! :D
@smg400v5
Жыл бұрын
I tried it and the enemies were still colliding but they were also still chasing me.
I copied the code for camera movement but it doesn't seem to be working. anyone got any tips?
@leviwastooshort478
Жыл бұрын
IDK its the same 4 me
I hope you add multiplayer it would be fun!Or you can do a other tutorial
@azmaintheproplayer2847
2 жыл бұрын
agree
@ShiftClickLearn
2 жыл бұрын
That would be really cool and also very complex!
@penguinpenguin3156
2 жыл бұрын
@@ShiftClickLearn yeah a couple of tutorials but you dont have to I hope you do great vids :D
@qwertyuiopasdf160
2 жыл бұрын
Or maybe a co-op
@penguinpenguin3156
2 жыл бұрын
@@qwertyuiopasdf160 i mostly want more than two people though
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
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
@ShiftClickLearn
2 жыл бұрын
Oh, that's a good tip!
@AVeryRandomDude
2 жыл бұрын
@@ShiftClickLearn thanks :D
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
Can someone tell me how to make the enemies smaller?
When i tried to make enimes move they stay still please help
Would it be possible to make a scratch shooter game where the enemies shoot at you without needing a ton of sprites?
@parkerdedrick8967
8 ай бұрын
There aren’t many sprites 💀
@parkerdedrick8967
8 ай бұрын
But yes. It would be possible.
@JackNoEyes
8 ай бұрын
I mean like making the enemies bullets all clones that come from cloned enemies, sorry for the confusion and thanks for replying @@parkerdedrick8967
Hey can you make an RPG series tutorials
@ShiftClickLearn
2 жыл бұрын
That would be really cool! I have something else planned tho... ;D
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
@yehtetthar9949
Жыл бұрын
HEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE GOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!
@ShiftClickLearn
Жыл бұрын
nice....
YES
@misterdot6923
2 жыл бұрын
awesome content! keep it up.
@ShiftClickLearn
2 жыл бұрын
Thank you, will do! :]
can anyone help?? the icon stuff for the enemies isn't working
@kathleenwyner
Ай бұрын
please i have to submit this tomorrow for my final
you should make a studio like griffpatch for the project
@ShiftClickLearn
2 жыл бұрын
That would be cool...
How can you add wall collision in this?
@ShiftClickLearn
Жыл бұрын
I have a tutorial on wall Collison! You'd basically replace the movement shown in this video with my other tutorial. Here: kzread.info/dash/bejne/gaGGypiMiNKvYLw.html
@thederbly6009
Жыл бұрын
Thanks
this was really good but only 1 enemy was moving with the camera
Does not work my enemies keep spawning on my player 4:48
Time to copy-paste and change the texture and call it my game
@ShiftClickLearn
2 жыл бұрын
lol... please give credit tho xD
@qwertyuiopasdf160
2 жыл бұрын
@@ShiftClickLearn sure lol
the "costume" code wont work correctly
my scrolling is not working Please help me
a small bug: the enemies still collide with the offscreen enemies
THE GUN IS STUCK WHEN I GO TO LEFT OR RIGHT
The enemies aren't following me, explain please...
@ShiftClickLearn
2 жыл бұрын
Did you copy the Move "steps" steps block correctly? (This one: kzread.info/dash/bejne/X4ybqtuQfsTepM4.html )
@nikshitsharma9671
2 жыл бұрын
@@ShiftClickLearn, Yes. I did...
430 viewvs 7 hrs ago Ayo 😳
@ShiftClickLearn
2 жыл бұрын
😳😳😳
I found I little bug, that is enemies can get stuck from icons, I think because they are in the same sprite.
@scary_daddy
Жыл бұрын
Yeah, at the moment my enemies are also stuck as icons, Scratch must've had an update that changed something
5:45
HOLA!!!!!
@ShiftClickLearn
2 жыл бұрын
HELLO!!!!! :D
This video cuts a lot, I couldn't catch up most of it.. Hopefully, you fix this..
Add recording system or bad
@ShiftClickLearn
2 жыл бұрын
0-0 lol
@ShiftClickLearn
2 жыл бұрын
good idea
@SUPY_
2 жыл бұрын
@@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
Good tutorial but if you could do it a little slower that would be much apprisheated
Bruh, there is one more like until it is 666😂😂😂
29th like
@ShiftClickLearn
2 жыл бұрын
thanksssss
61th veiw and 13th like
@ShiftClickLearn
2 жыл бұрын
Thank you! :D
hi
@ShiftClickLearn
Жыл бұрын
helloo
wwooooowww i'm commenting on my own videooooo
Your Tutorials Are Really Good But Can You Speak Slowly.
@ShiftClickLearn
2 жыл бұрын
Thanks! Sorry about that- if you need, you can slow the video down. (Settings > Playback speed > 0.75 or 0.5)
@marcusfelberbaum3629
2 жыл бұрын
@@ShiftClickLearn Thankyou
bro went to fast i messed up my whole project and cant fix it
@TheRealKensterBoosteryt
2 ай бұрын
Same.
The enemy's still stupid tho
hard please easier
69 not op
@ShiftClickLearn
2 жыл бұрын
aHHhh
😠
This is very laggy
I always click on dislike even tho i love it :/
@ShiftClickLearn
2 жыл бұрын
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!
@ShiftClickLearn
2 жыл бұрын
Griffpatch's number counter is good! (You could also use mine hehe.) :D
@AVeryRandomDude
2 жыл бұрын
@@ShiftClickLearn I will use yours cuz this is your game :D