[Resolved] Stop and Restart the game

Hi

Is there any way how to stop everything and restart the game?
When the game ends (run out of lives), I’m stopping all Runtime listeners and call the menu storyboard. Once the menu storyboard is created, storyboard.removeAll() function is called.
But the problem is, that it generates a lot of errors because the objects are removed during comparisons or functions are called to objects that doesn’t exist anymore.
Is there any way how to prevent that and “clearly” restart the game?
Hope it makes some sense :slight_smile: [import]uid: 181861 topic_id: 33353 reply_id: 333353[/import]

You would have to stop transitions going on that are tied to objects that have been removed, cancel timers, make sure ALL Runtime listeners are cancelled, etc - this should stop any errors like that from occurring. [import]uid: 52491 topic_id: 33353 reply_id: 132471[/import]

it seems that this was the problem, I was pretty sure that everything is canceled…

thanks for help :slight_smile: [import]uid: 181861 topic_id: 33353 reply_id: 132577[/import]

You would have to stop transitions going on that are tied to objects that have been removed, cancel timers, make sure ALL Runtime listeners are cancelled, etc - this should stop any errors like that from occurring. [import]uid: 52491 topic_id: 33353 reply_id: 132471[/import]

No worries, happy to hear it - sometimes you have to quadruple check!

Peach :slight_smile: [import]uid: 52491 topic_id: 33353 reply_id: 132676[/import]

it seems that this was the problem, I was pretty sure that everything is canceled…

thanks for help :slight_smile: [import]uid: 181861 topic_id: 33353 reply_id: 132577[/import]

No worries, happy to hear it - sometimes you have to quadruple check!

Peach :slight_smile: [import]uid: 52491 topic_id: 33353 reply_id: 132676[/import]