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

2012/10/1

Life

Stephon231 Stephon231

2012/10/1

#
how can i give an actor get three lives and every time it comes in contact with an snake or alligator the life goes down one then when there isn't any life left it removes the actor. i have a life counter and when the snake hits it the counter goes down but the snake stays there and the counter keeps going down.
erdelf erdelf

2012/10/1

#
check the variable of the counter in the act() method and if it is zero, remove it.
Gevater_Tod4711 Gevater_Tod4711

2012/10/1

#
it would be easyer to help you if you could show us the part of the code which is important for this.
You need to login to post a reply.