Appearance and deletion of object with timers

In my code, a FuelContainer object appears every 15 seconds. I can get that to work. I want the FuelContainer object to disappear after 5 seconds have elapsed. I can get it to disappear, but it does not come back again. I’ve tried many ways, but here’s my latest code. Thank you for your help, as always. This forum is the best for game help! :slight_smile:

I think it happens because when you create the second FuelContainer, the timer “fuelContainerDeletion” = 10 seconds, so the new FuelContainer is deleted immediately :smiley:
You should reset the timer “fuelContainerDeletion” when you create the object, along with the timer “fuelContainerAppearance”, so the timer will start counting from the time the object is created :wink:

Note GD has (in native platform) a debugger that keeps track timers, to check things like this.

Thank you very much! Your suggestion worked.

Can you please tell me how do I access this debugger?

(Only for Native games) After pressing “Preview”, some new buttons appears in the ribbon, one of them is a nice bug, pressing it during the preview adds a new window, where you can keep track of variables, objects, timers… it allows you to advance your game per-steps too :slight_smile: