HI i made metroidvania with lua on Windows with VisualStudio code and the ldtk with theHelp of the Tutorial from SquidGodDev and encountered the Problem that Enmies and Bullets had a Chance to dont have an lua proxy while destroying each other what I thought I fixed by adding some line in the destroy function which stops the Update loop of the object before its removed.
I thought this worked well but now it happens that If you destroy an Enemie there is a chance that there is still some sort of collision detection which destroys bullets and crashes the game if a player or another enemie collides with it, additionally theres also the problem that the player also has a chance to don´t have a lua proxy when changing the level or dashing near a Wall which is near the other level I tried to fix this by stopping the whole game Update when switching rooms it doesnt help much.
I am not abel to Replicate these errors consitent and it feels very random, when and if some of them occure.
Here is the whole Game I hope somebody might be able to find a solution
Here is the whole Project thx in advance:
Beta-Anti-Metroidvania.zip (2.9 MB)