Changing Hero on death behavior?

Started by Yeury, November 04, 2017, 07:25:41 AM

Previous topic - Next topic
What script handles what happens when the hero dies? Right now what happens is basically the map restarts and my hero's health is restored but I would like to teleport him to another map upon death.

You can define the event game:on_game_over_started() to do what you want instead of just restarting the game (which is the default).
See http://www.solarus-games.org/doc/1.5/lua_api_game.html#lua_api_game_on_game_over_started