I'm trying to make a game with lives in it and trying to make the heart object disappear. Does anybody know the code?
lifes = lifes -1;
if (lifes==2)
{removeObject(heart3);}
if (lifes==1)
{removeObject(heart2);}
if (lifes==0)
{removeObject(heart1);
Greenfoot.stop(); //or what else}