How can I create a timer so an object will disappear after a certain amount of time?
In the act method of the class of the object to be removed, place code similar to the following:
timeCounter--;
if (timeCounter == 0) removeObject(this);
This may or may not be the exact coding you would use (it is just a format to follow -- and not complete, at that). You will need 'timeCounter' declared as an 'int' field within the class. The initial value of this field determines how long the object is to remain in the world before being removed. Normally, 55 would represent about one second of time.