In my scenario I have an actor "rocket". And in this "rocket there is an integer. And if this integer is over 100 it activates a shoot function and another object is added (which is just a "Shoot" sign). But if this integer is under 100 I want to remove this object but it won't work. I put it like this:
private void remove()
{
if(laden<100)
{
getWorld().removeObject(shoot.class);
}
}