I doubt I can get much help here on this but I’ve looked at all the code that seems remotely relevant and I have no idea what’s happening here.
I’ve got a platformer where you periodically die and get returned to the starting area. I have a few killzones (bottomless pits) that kill you automatically and a few hazards that reduce health, until you hit 0.
There’s a few other places where you go into a chimney and then come back out. They are not near any kill zones, none of the involved code reduces health or triggers the death variable, but there appears to be a 10% (approx) chance whenever you exit a chimney that the game will kill you and return to the starting area.
I’m not sure what I expect here exactly - I think you’d have to see the entire scene file to figure anything out and I don’t expect anyone to do that. The bug is most likely caused by a simple misapplication of basic code - I can’t think of any advanced scripting stuff I don’t know yet that would be causing a bug specific to my game.
I guess my question is, has anyone had a similar problem and was there any particular technique to help dislodge you from looking at the coding the same way over and over again? I keep searching but I keep seeing exactly what I expect to see.