Help with a special game


#1

Hi guys! I need help with a very important game for my dad and I am having trouble with one part. Where my character has to cross a street. If he gets hit by a car he loses a life but no more than 3 lives. How do I code 3 lives?


#2

Here you use values.
First
When project is started
Set value crash=3
Next
When car bumps Character
Change value crash by -1
Finally
When 7=7
Check once if crash=0
Set invisibility=100
End

Questions?


#3

It isn't not working!:grimacing: Would you like me to send you a link of the game?
I know about links because of my sis @silverstream


#4

Of course! (20 character)


#5

Do this:
- Create a new object (text) and call it anything. I'd prefer Health or something like that.
- Then create a new When Play Button Is Tapped rule for Health and pull out the Set Value block.
- Then create a new value in Health and call it Health or anything.
- After that, take out a Set Value block, and set the value Health to 3.
- Now on your character, create a new rule When -- Is Touching --
- In the first space, put your character, in the second one, put the car, or any object that is colliding with your character.
- Then, add in a Set Value block, and put Health in the first space, in the second, put -1.
- You can also use Increase Value by -1 if Set Value doesn't work.
I hoped this helped! Just tell me if I missed anything, and I will get back to you. :slightly_smiling:


#6

Here is the link
https://c.gethopscotch.com/p/xkk1j3p7c


#7

sorry @Grabos I can't get to the link because I'm on the computer I know you can see me but....
ask @Hoppertoscotch if she/he can get to the link or if it is blank. to ask her/him just press their name.


#8

Ok I will @silverstream


#9

heres the link


#10

@silverstream what do you need exactly?


#11

Can you see the link?


#12

not really :grin:

from grabos


#13

Yeah, I just deleted the project.


#14

We did that and it will only lose one life and then never do it again. So now we're stuck at 2 lives and it won't go down any further. The Increase Value by -1 block is inside a Repeat Forever block.

Any help?


#15

sorry I have't responded in a long time.:grin:


#16

I was doing so many things that I forgot all about hopscotch form.:grin: Im sorry.:pensive: I hope you forgive me.:open_mouth:


#17

That's ok! I completely understand!


#18

Now that you have responded would like to tell you about that game that I needed help with.I wanted to tell you that I fixed it.I also wanted to know if you wanted to be friends.:slight_smile:


#19

Kiwicute2016 are you still there?:slight_smile:


#20

Yes she is there sometimes she needs a break though!