HELP! with code! pls!

im trying to make a plant vs zombie game but right now i can’t figure out something. how do i make it so that the peashooter will only shoot when the zombie is in the row it is in? here is the code if you want to edit.

:https://arcade.makecode.com/S07625-14909-28756-59563

1 Like

I think I have found a fix. This code will only make pea shooters shoot peas if there are zombies in the row. I didn’t do anything else, so let me know if you need more help.

2 Likes

Thank you! if i ever need help i will deffinitely let you know!

@SoapMimic i need help again. i cant get it so that when the zombie overlaps a plants it takes damage and only hit the plant it is on and not other ones. info: zombie damage:100 sunflower health 600 peashooter health:1000

can you also make it so that you can see where you are going to place a plant before you plant it? so like make it so that when you hold “A” it will show where the plants will be and once you let go it will plant it .

game link:https://arcade.makecode.com/S24189-67342-92479-54475

okay I’ll try to help.

2 Likes

I’ve done most of the fixes except for the one where you hold A and it shows you where the plant will be. Also, I’d recommend being careful using the arcade-carnival extension. It’s useful, however I have found that sometimes it causes you sprite kinds to delete themselves.

Here’s the link to the code:

2 Likes

Thank you!!! and fonts really cool!

1 Like

@SoapMimic, i have been improving my game my making levels and more diffucult zombies but could you draw different variants of zombies for me? there isn’t theme it is based off of so just use your imagination.

i will be drawing some to and pick off what u and i have drawn and maybe some other people.

pls put a link in here from where u drew so i can copy and paste it.