[Solved] Laser object still gets created after the scene timer is deleted from memory

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

What is the expected result

After the boss segment the laser spawns from is deleted after dying, the scene timer that makes the laser be fired is supposed to be deleted from memory so that the laser doesnt get fired anymore

What is the actual result

It still gets fired although it appears at the upper left corner on the screen

Related screenshots


I put the láser shoot timer to 1 second to make testing somewhat more practical.

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.l

It’ll be because of the wait 2.9 seconds action. If the boss segment is deleted while the wait is still in process, then the laser will still get created.

Adn because there is no boss segment, GDevelop defaults to 0,0 (top left) for the position to create the laser.

I put it to wait 2.9 seconds so the laser would be shot after the sound finished playing.
Then, how do I fix it?

Before you create the laser, check the boss segment still exists in the scene. Use this condition for the boss segment object:

1 Like

Hey it actually worked, thx