Scratch 3.0 Tutorial: How to Make a Tower Defense Game (Part 4)
ฝัง
- เผยแพร่เมื่อ 5 มิ.ย. 2024
- In this video, Scratch 3.0 Tutorial: How to Make a Tower Defense Game (Part 4), I make some improvements to the turrets by adding a base and a turret firing animation. I also make the turrets unable to be placed on the track or on other turrets.
Subscribe for more tutorials on how to make games in Scratch!
How to Make a Tower Defense Game (Part 1):
• Scratch 3.0 Tutorial: ...
How to Make a Tower Defense Game (Part 2):
• Scratch 3.0 Tutorial: ...
How to Make a Tower Defense Game (Part 3):
• Scratch 3.0 Tutorial: ...
My Tower Defense Game project on Scratch:
scratch.mit.edu/projects/4112...
If you need help with your own Tower Defense game, ask here:
scratch.mit.edu/studios/5241009/
I recently published a new mobile game, Flingy Fruit (available on iPhone and Android)! Check this video out if you want to see how I made the game:
• How I Made My (Second)...
You can also check out this video for the other mobile game I made, The Last Chicken On Earth:
• Mobile Game Announcement!
Outro music (I only used part of it): bensound.com
For business inquiries: contact@fuelvin.com - แนวปฏิบัติและการใช้ชีวิต
Hope you enjoy the video! I'll be working more on the enemies in the next tutorial.
Here's my Tower Defense project if you want to check it out for yourself:
scratch.mit.edu/projects/411210603/
If you need help with your Tower Defense game, feel free to ask here:
scratch.mit.edu/studios/5241009/
Love you from India too....❤️
I love this project 👍👍👍👍👍👍👍😍from India
hello you rock waiting for new viedos too from india
I do scratch I have a class but sadly covid 19
war fame i found some funny thing about you other game that like bit rush you name the variables like dgysddsazhxzxaqgs77$!RR#DWdvdd
Too everyone whos base won't work the second time they place a turret:
In the "if mouse down-wait until not mouse down"Script in the turret where it broadcasts the message "place turret" you need to move the "broadcast place turret" above the "wait until not mouse down." This worked for me, and pls reply if this comment wasn't clear enough so I can clarify
OMG thank you so much
I was trying to fix this for ages then I saw your comment😂
Thanks a ton
thanks you're a lifesaver
@@QWLUXY SAME
warframe: **does something**
also warframe every single time: alright,cool
whoops, didnt even see this comment XD it's true though
At this point, all future developments have to be made to look like the thumbnail, instead of the other way round. Neat! In a way, it gives you an idea of what the finished game is supposed to look like.
Thanks, this helped me a lot! I'm happy:)
thank you man. I actually wanted to make a tower defense game for soo long but I was too lazy to learn how the lists work
lol
Tip: if you dont want to make loads of complicated code just for a base, just put a perfect circle (holding shift and dragging with circle tool) in the centre of the turret sprite
i made my towers humans so i didn't even need the turret base
dude this is great. I have a problem with my base so when i read this it helped me so much, thanks a lot.
this was such a helpful tip because my base was only cloning once and i couldn't find how to fix it
but what do i do after it? like he duplicates the code of the base but i dont have it since i made it a circle on the original turret sprite
bro ur vids taught me so much thnx again for all your help! :)
Thank you warfame , because you i know more about coding in scratch , even now i made my own game .
U helped me so much and as a beginner coder i thank u A LOT. so you just got a sub. thanks!
Great job whoever made it this far! Keep it up! You are one of the 50k people of the original 320k!
im not ;-;
@@RaNdOm3.1415 i am :D
thanks
TY this helped me so much with my btd4 recreation!!
Great video as always. Love this series. 😊
Yes I like this channel and this project
2 of my favorite Scracher TH-camrs in one place
Hold Up
wh- wha- when did you get here?
@@WedPainter ikr
I agree
tbh i like it without making the turret's cannon the same in the firing costume cuz i like it when the firing part is shorter than normal.. it looks like it is actually shooting like BANG!!
OMG, i hope it will be GREAT when its finished :D
warfame : *does a really bad error*
also warfame : alright cool
Great tutorial as always! Warfame, I have a question, whenever I take the turret the enemies don't spawn in anymore. For example, there were 4 enemies spawned at the moment and when I took the turret they stopped spawning. Can you help me with this? Thank you. Also, this started happening when you added the code that made sure that the base and the other things do not malfunction
Why has o one commented in 11 months???
This series has used sooo many blocks that i've never used. Its using so much of my brain power. I LOVE IT
why does no one comment after 3 years
@@vitaliwaisbek8510 true
Tip: Hold alt to scale sprites from the center, hold shift to scale them non-proportionally (in the vector editor).
Tip 2: The max amount of clones is 300, if you hit this limit, no more clones sill spawn until other ones are deleted. (not sure if this is per sprite or for the entire project)
Tip 3: The red collider shouldn't use clones since there would only ever need to be one of them. (red one only)
underated
you can only have 300 clones per project
I love the video I have made every single game of yours
AMAZING CODING! KEEP UP THE GOOD WORK!
To change the turret range all you really have to do is place view radius in the set size to. It's actually really accurate.
There is another much easier way to do the turret collisions. It is to import the block of if it is touching itself from another sprite. It will detect other clones.
also i havent seen the other tutorials ive seen 1-4 and if you havent already can you make a tutorial on how to make diffrent enemys and turrets
For anyone that has the bug when lagging while the turret shoots an enemy, make a brodcast and in that brodcast make a "wait"
block and then switch to the original tank sprite. It worked for me.
I don't understand, where do I make the wait
i like your projects very much
I love your videos
warfame is a scratch master .
Nice spelling
@@_Rileyy_ i didnt done any spelling mistakes
@@_Rileyy_ *_True_*
@@jjjacobplayzzyt3696 Nice Grammar
@@jjjacobplayzzyt3696 its warfame
Thx bro I used this as my ice project hopefully I get a full mark
when you moved the turret spawning code to the collision box sprite it fixed the multiple turret problem i had before
I actually just made the turret collision script myself since it didn't work, but this series is really good! I'm subbed :)
edit: if i'm gonna be honest the script i made was probably simpler than the script used in this video lol (but it did follow the formula of make a clone that is used for collision)
Same i also made one myself and its so much easier to make than calculating random things
Can you show it please? i have no idea how to fix it.
Finnally Your so great Warfame
Btw make sure to keep the placed turret collider(original sprite not the clones) far away from the path so that no one would wanna place it there. This is because the original sprite also prevents you from placing any turrets so if it's in the middle or in a place where people will keep turrets then it could be a problem
thank for your videos
What an awesome series! My 10-yr-old daughter wants to become a game developer. I'm going through these videos with her, trying to help her along and she's really enthusiastic. She can hardly wait to start working on the next part.
Hi warfame , i have some questions . Why when I drag my turret to the track, why is the red colider under the track? Even though I have put the track into the back layer, can you help me
So cool so far
Hello
i love your videos because i will programm a cool game and its very good that you discribe all these things that yo do
bye
Can u tell how u made the pre game backdrop cuz i dont know how to so pls :>
You can just have the TurretCollider check for collisions with itself, get a "Touching TurretCollider" block from another sprite and drag it into TurretCollider, and voila, easy.
warfame you are the best you thought me how to code now i know i made my own game
thanks
-You taught me how to code- *You thought me how to code*
@Sreenivas Boddula taught*
good vids man
best scratch teacher ever GG
of course, i like and sub u helped me a lot and can u pls make an RPG game for 3.0 scratch
8:05 Instead of pasting that into the second costume, I kept the old barrel length to have the effect that there is a recoil-absorbing spring inside the turret. Might be a bit too much attentive to detail but I think it looks cool.
i did exactly the same
Same
Thank you
warfame, i have a tip for you. instead of actually creating a new sprite for not being able to place turrets on turrets,
you can actually just put an "or" block in the operaters category.
and put a check for touching turret on one side, and the track detection on the other
but the turret is touching the collider when you select it so you cant place it
You are my savior
for some reason when my tower attacks he decides to send the enemies to their doom and kill every enemy in sight and makes them just never move is there a way to fix this
Bro I am your biggest fan
Hi, I'm having trouble moving my turret with the base, can you walk me through this, thanks.
After I placed my first turret with the base all the following ones had so base and it stayed at the shop how do I fix this?
U rock bro
You are the best
thank you
hm the part of the colliders dint work, the track collider stopped working, what should i do ?
great!😍😁
thank you!!!!!! I just finish a hard bug!!!!! I going to sub
Thx
Hey Warfame . I am having trouble with the turrets.they work after killed 2-3 troops then it changes direction and shoots in air.please help
Can make a upgrade function ?
Can anyone help me? I was able to set down the baseplate, but if I tried to place another, the baseplate wouldn't follow but instead would stack on top of the shop icon.
is it normal that when i place 2 turret at different place the second one have the 2 turret and the first one has the base only
i have a problem, and i need to be solved soon, i am making the game but, when i try to place a second turret, it only moves the base, but the turret auto places, is there and solution, or i need to start over?
warfame if you see this i have a bit of a problem my track sprite is a bit cut off and now its affecting when the red box thing appears. if you know how to fix it please reply.
why some time when you like click motion, sensing, variables etc the table kinda gitch
Warfame can you help me, when i click the turret ít only have the base for the first time, the second time it stuck in the button and it only drag the turret.
i changed it so instead of a red box showing up on the tower, i made the range go a bit red instead
help, how come when i place multiple turrets, the base acts differently?
edit: i fixed up some code and now its working properly.
Awsome
mine is just set size to view radius because when i put view radius / 100 * 100, its size turns it into 2
The auto range scale didn't work for me and I did put the number which was working for me (75) and also I had to change the code for the turret collider because I already added a base in ep2 It was a circle so rotating didn't matter and I didn't want to make it separate so the turret collider code I just took from the turret and changed it a bit so it worked with the collider (hope that won't cause any problems in the future) that was a long comment.
IT'S PART 4 YAY
Is the base required when making a unit?
12:01 Aaaaah the satisfying sounds of the keyboard.
5:55 You could use a circle for the base. that would work
Edit : Nvm your base looks way better
9:45
I just used
When flag clicked
Show
Go to [Turret Sprite]
Go to back layer
Etc.
I did everything perfectly and I could still stack the turrets
Why, when i click to mini tower, and to the track, the turret places under the track without base????
I need help :( around when I'm finished doing the collider thingy. When I test it. The enemy won't go to the path anymore, can someone help me :(
I know this video is pretty old, but whenever the enemy gets in range of the turret and it shoots the game pauses for a sec, but it not lag or anything be the enemies still spawn. Does anyone who actually uses scratch know what's going on???
what if I move my mouse and then I can put another turret on top of one turret
i have a problem: When i place the first turret ist shoots but when place the second both stop shoot and even stop turn around
what should i do to fix this?
Edit: They shoot even if i have two turrets but somehow 3 enemies always remain
Any1 knows how to fix?
3:29 to about 5:40
You can just put. [Set size to (View radius) %]
Ik it works cuz that’s wut I did and it’s the exact same as urs just mor simpler
hi your vids are great but idk what happened whne doing the colider wven tho its out of the track when i place it with parts of the track it dosent work i cant place it
pls tell me
nvm i figured it out
Can't you do "if " instead of making a new track sprite?
Any idea how to fix a code? for some reason the turret only shoots 8 to 9 times before not working anymore
Awesome :0
If your haveing a problem where you can only place 1 tower, duplicate the "Wait until Touching mouse pointer and not mouse down" get rid of the "Not" and put it at the bottem of your forever loop.
This doesn't work for me becuz I try And I can still place on track then I change and now I selected one and place then selected the next one and all it did is that it just place automatically on just the spot without move it or it take one of my turret and put it under my shop thing and give me a new one.
There is a problem with mine that when i place down the turret for a second time when i click to move and place my turret the base just falls and i cant use it but i think im just going to ignore the base cause i think it looks good bye it self. Thank you so much for the tutorial im in 6th grade and want to show all my friends how good of a game i can make over the weekend (and as a little coding practice) so thank you for being a great person and creating this.
Some how i fixed so POGGERS
@@breathingspaceyogastudiowi656 same i fixed it by going on turret putting the broadcast above the wait until Not Mouse Down
@@bradenexplosive YOO OMG U SAVED ME!!!!!!!1
the turretcollider doesn't work i set it like you but idk why it did not work
i like your youtube channel
i made my base on the original turret clone and just made it a circle so i dont have to do that
um the small bit of code we add (place turret code) to the turret sprite and receive in the turret base sprite works the first time, i can click the turret and the turret and base move, and i can place them and it works fine, but if i try to get 2 or more it only drags the turret clone and the turret base clone stays. Edit: is it not supposed to do that, or do we fix that later on?
I'm actually having the same problem and I think I know the reason. I logged the mouse action variables when they were changed, it showed that the mouse action would go to none as soon as you click the second or third for an odd reason.
When the thing is over, that thumbnail thing pops up. How do u do it? Great vids btw
use set ghost effect 100, it will clear effect when done, effectively causing that thumbnail to show up.
or you could make a thumbnail make it go to front layer then say when green flag clicked hide
@@araminta79 well it doesn’t show up if it stops then
i subscribe since you have 10k subs :)
i m an old subscriber
How did you add 2 nother thing to the game
Good
warfame i really love your vids can the next game u make be BRICK BREAKER