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

2015/11/23

Respawning?

bb2ninja bb2ninja

2015/11/23

#
I am doing a project in programming where we need the actors that we control to have three lives, and we can't figure out how to make them respawn. Help??
Super_Hippo Super_Hippo

2015/11/23

#
Instead of removing them from the world:
lives--; //or however the field is called
if (lives < 1) getWorld().removeObject(this);
else setLocation(100, 100); //the respawn position
You need to login to post a reply.