Hi everyone,
I’m currently developing a small 2D educational fire safety game in GDevelop where the player learns how to extinguish fires using the PASS method.
In my game, each fire consists of:
FireCore (logic object with variables)
FireEmitter (particle flames)
SprayHitbox from the extinguisher that reduces fire intensity
The fire works like this:
FireCore.Intensity decreases when the extinguisher spray hits it.
When FireCore.Intensity <= 0, the fire is extinguished.
I set FireCore.IsActive = 0 and hide the flame emitter.
The issue is with my respawn system.
I currently have a system where:
If the Player collides with FireCore, they respawn at the SpawnPoint.
The problem is that even after the fire is extinguished, the player still respawns when touching that area. This happens because the FireCore object still exists in the scene.
However, I cannot delete the FireCore object because I use it to check when all fires are extinguished, which then triggers dialogue to continue the level.
If I delete FireCore when the fire is out, the post-extinguishing dialogue never triggers and the game gets stuck.
So my questions are:
What is the best way to handle damage/respawn from fires in this situation?
Should I create a separate hitbox object for active flames and delete it when the fire is extinguished?
Or is there a better pattern for handling fire logic vs collision damage in GDevelop?
Right now I’m considering checking FireCore.IsActive = 1 before triggering respawn, but I’m not sure if that’s the best long-term solution.
Any suggestions or recommended design patterns would be appreciated.
Thanks!
