This site requires JavaScript, please enable it in your browser!
Greenfoot back
Scarlett
Scarlett wrote ...

2017/3/16

Help needed urgently

Scarlett Scarlett

2017/3/16

#
Hi guys, I am very new to greenfoot. I need help with my game. I have a counter that counts how many burgers my avatar is eating, but I created another counter called lives. I have snakes and crabs that "attacks" the avatar, when that happens I want the lives count to go down (minus a life). Would someone please help me out. Thank you
danpost danpost

2017/3/16

#
After you create the lives counter, use the 'setValue' method to set the number of lives allowed. Then, use 'lives.add(-1);' to lose a life.
You need to login to post a reply.