Discuss Scratch

WilliamAftonBonnie
New Scratcher
4 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

I'm trying to make a chase game that when it touches the other sprite the variable goes up by one point. please help, as its not working and i have no idea.
Catalystix
Scratcher
100+ posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

foreveriftouchingOtherSprite?thenchangeTouchesby1waituntilnottouchingOtherSprite?

Last edited by Catalystix (Dec. 16, 2019 22:56:43)

WilliamAftonBonnie
New Scratcher
4 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

thanks mate
WilliamAftonBonnie
New Scratcher
4 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

LadyJennavaire
Scratcher
10 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

Have you tried having the code be like:
whenclickedforeverchangeby0
LadyJennavaire
Scratcher
10 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

I meant:
whenclickedforeverifthentouching?changeby0endend
LadyJennavaire
Scratcher
10 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

Sorry, I can't use the scratch blocks for some reason.
Catalystix
Scratcher
100+ posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

WilliamAftonBonnie wrote:

not working for me https://scratch.mit.edu/projects/352676906/

You also need the ‘when (Green Flag) clicked’ hat on top. All code needs to be activated by an event block. sorry i assumed this was known. this is the block you need on top of the forever loop:
whenclicked
WilliamAftonBonnie
New Scratcher
4 posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

Thank you so much it works now
19CragOl
New Scratcher
1 post

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

How do I add points to a game?
deck26
Scratcher
1000+ posts

How do you add variables in a chase game so that when i touch another sprite it changes the variable by 1

19CragOl wrote:

How do I add points to a game?
Create your own topic please rather than necroposting. Give more details though, you're not giving much for anyone to go on.

Powered by DjangoBB