Minimize the game

If game minimized, i want to restart the game. How can i do that? Because some errors occur and i cant deal with them.

Yeah, are you using the restart() function? That seemed to keep bringing up errors for me too. Just make another function to reset all your values/players/enemies etc.

Okey. How can i check minimized or not?

What do you mean by minimised? As in, the app has been quit, or a pause button has been pressed?

How can i check minimized

Do you mean when the app enters a background state, eg when the user presses the home button? (I think in iOS that’s called backgrounding rather than minimizing). Although Codea has no “app did enter background state” function, there are workarounds, involving measuring time elapsed since the last update. There was a discussion about this quite recently. I just searched and couldn’t find it though. Can anyone dig up the link?

Yeah, i mean backgrounding. When player pressed home button and jump back to game, my last touches stay permanent. Like that.

I think codea needs a function.
if pressed home button then
--do your last thing
Edit : i saw link. Let me check : :smiley:
Edit2 : Problem solved. I can use os.time() for that. Thank you so much guys!

Thanks @MattthewLXXIII for finding that.
@Ralp7 is this ninjas vs cowboys? Looks good!

I’m tring to do a assassin’s creed concept. I will change sprites when coding is done. :smiley: