Reloading level but not reloading physics properly

Hi, I wasnt able to reload my game, so I did a Research and the most effective way is to create an intermediate scene like this: Level1.lua ---- Reload.lua----> Goback to Level1.lua

So I did this and I was very happy because everything seems to be working perfectly except for an error:

 evel1.lua:506: attempt to call method ‘applyTorque’ (a nil value)

Im my game whe you tap the screen an apply torque method is applied to a physics body… When you start the game for the first time It works perfectly but when I reload the game (using the intermediate scene) The gravity works fine but my applyTorque its a nil value.

Why could that be happening?

Other Strange thing that happens its that my sound FX’s sound louder and duplicated.

Thank you for your Help

Error you get says that you are trying to call not existing method/function (nil). If so, it means simply that object is not physics object.

If you use storyboard, watch this http://www.youtube.com/watch?v=2IDzu6qWRCM  :slight_smile:

About sfx… I can only think about duplication and playing it simultanously.

Unless you provide some code it’s hard to address any specific issues.

Error you get says that you are trying to call not existing method/function (nil). If so, it means simply that object is not physics object.

If you use storyboard, watch this http://www.youtube.com/watch?v=2IDzu6qWRCM  :slight_smile:

About sfx… I can only think about duplication and playing it simultanously.

Unless you provide some code it’s hard to address any specific issues.

I’ve had similar issues. Mostly it’s from going from menu to level selection, to level 1, coming back to level selection and going back to main menu = increase in memory, even after I remove the display objects, even listeners. 

My understanding is destroy scene doesn’t actually destroy anything except what’s in it but the scene itself remains in memory. That’s VS purge scene which I think completely takes it out.  I’m using destroy scene, so maybe I’m ok.

For you, have you tried messing with timers and having the scene go on screen, then have timers that start up all the physics related items (like 100ms or something). That’s helped me in the past, but I wasn’t using joints at that time. 

-Nick

I’ve had similar issues. Mostly it’s from going from menu to level selection, to level 1, coming back to level selection and going back to main menu = increase in memory, even after I remove the display objects, even listeners. 

My understanding is destroy scene doesn’t actually destroy anything except what’s in it but the scene itself remains in memory. That’s VS purge scene which I think completely takes it out.  I’m using destroy scene, so maybe I’m ok.

For you, have you tried messing with timers and having the scene go on screen, then have timers that start up all the physics related items (like 100ms or something). That’s helped me in the past, but I wasn’t using joints at that time. 

-Nick