How to make a game Plants vs Zombies in Scratch 3.0 Part 1

preview_player
Показать описание
Hi! My name is Polina, welcome to my channel!
In this video I will show you how to make a game Plants vs Zombies on Scratch!
You will learn how to use variables “for this sprite only” and how to make your own blocks in Scratch.

Scratch site:

Remix my project here (just go to this link and click the green “Remix” button):

My scratch tutorials:

Minecraft games on Scratch tutorials:
Рекомендации по теме
Комментарии
Автор

you're a genius, the way you made the plants snap to a grid was so smart

nathanielsch
Автор

Gotta give props. This is by far the best PvZ made in scratch tutorial

SquidowuidoLobder
Автор


0:30 Upload backdrop and cards
1:15 Making cards
2:50 Sun falls from sky
7:10 Sunflower
16:34 Peashooter, wall-nut and cherry bomb
19:53 Suns by sunflowers
22:31 To be continued

scratchcodingtutorial
Автор

This tutorial was great! Now i can make my next project based on pvz. Its gonna be fun ngl.

Randomutfan
Автор

Wow your a genius! I can't even Make clones Properly you Really Actually are A Genius!

Arielcandidomaercelino
Автор

I recommend using lists instead of variables when a clone creates another clone like a sunflower spawning a sun and a peashooter spawning a pea.
intead of

[Sunflower Sprite:]

Set [sunx] to (x position) -Variable
Set [suny] to (y position) -Variable

Create a list and name it sun post then do this to the sunflower sprite
Put a
"When GreenFlag clicked"
Delete all of [Sun Pos]

Then replace
Set [sunx] to (x position) -Variable
Set [suny] to (y position) -Variable

With
Add (x pos) to [Sun Pos] -List
Add (y pos) to [Sun Pos] -List

[Sun Sprite]

Then go to the sun sprite and instead of
When I start as a clone
Go to x:(sun x) y:(sun y)
replace it with
Go to x:(letter (1) of [Sun Pos]) y:(letter (2) of [Sun Pos]

And then put a
When GreenFlag clicked
If (Length of [Sun Pos]) > 0
Create a clone of (myself)

Then that should work better else the sun spawning wouldn't work if you have too many sunflowers.
Hope you understand what I mean

I did the same thing like you when I coded my PVZ game but now I replaced it with lists

I can see so many bugs but hope this one at least improve this a little bit.

ToshiyukiTokuda
Автор

whenever I do this it multiplies the amount of clones by 2 each time you place a plant how do you fix this

hbuxx
Автор

This is a very great tutorial but whenever i try to place the sunflower it doesnt go with my mouse-pointer can you help me?

tripleccustomembroideryand
Автор

You have done a great job! Sincerely, David 🙂

davidyenni
Автор

hi, I really thank you for your very awesome tutorial. But may I ask? I've tried the tutorial according to your directions, but why after buying the sprites don't follow the mouse pointer? But instead it is stored in a random position? Likewise with sun2, it doesn't appear side by side with sunflower and is saved in the same position as the previous sprite. Is there something wrong? please help me

rovinadelvia
Автор

Hi. Thanks for the tutorial, but it seems some of the Sprites are missing from the Google Drive folder? We are at 16:40 in the video and cannot find the walnut or cherry bomb gif files. It looks like it may be missing several other files and directories also?

robertkuropkat
Автор

hello, can you pls help me with my game when ever i will place my plant on the lawn like the peashooter it won't snap instead it will teleport to the peashooter sprite

levidavis
Автор

Thanks Polina! Great tutorial, easy to follow and helpful!! Thanks!

dash
Автор

hey i'm redoing your tutorial with some extra stuff in another scratch style game engine can i post it? (I already credited your channel and the video of part #1)And I also speak Portuguese so you can't understand the video 😂

yoshibugado
Автор

i have a problem the x place is working but y placing is kinda broken when i place it to other lanes it goes to top lane can u help me fix the problem?

Glagmi
Автор

tried doing this on my own but i had a problem with the peashooter that when you click on the card it spawns a clone and then that clone begins shooting when you have placed it but then it starts shooting at the original peashooter that i have hidden, and if i dont do it with clones you can only place one peashooter

alivinghumanbeing
Автор

The sun bar variable that changes numbers in your tutorial just of pops up. You dont explain how you got that graphic. I have my suns going toward a blank destination.

Asherons
Автор

Hey just saying that you can use the (backdrop of stage) block to get variables that are for this sprite only

yassin-animation
Автор

This seems pretty smooth cuz most scratch pvz games suck

Entity_
Автор

Great tutorial, but I have a bug where sometimes when I plant on the top row it instead places it at the max Y position. Do you know how to fix this?

grayanddevpdx