Emral wrote: ↑Sun Jan 21, 2024 8:53 am
smbx2 has no concept of gameovers. it just unloads the episode when all lives are lost
checkpoint data is saved to GameData which only persists in a session. it persisting through the title screen is a bug... in the buggy title screen (sidenote: NEVER load into another episode from it because it can actually wipe your save and the title screen will be removed in a future version of smbx2)
you can reset gamedata by just using the line GameData = {} in onExitLevel when all lives are lost.
or just call Misc.exitEngine() which ends the process and clears GameData by proxy while avoiding the title screen.
OR you can ALSO write your own Game Over sequence that resets lives and gamedata before reloading the map. the simplest implementation is just resetting mem(0x00B2C5AC,FIELD_FLOAT, 3) in onExitLevel when all lives are lost, calling Level.exit() and clearing GameData like above.
Just_Thomas wrote: ↑Sun Jan 21, 2024 7:35 am
The World Settings are a little bit of a scam, as "Restart last level after death" will be overwritten by a checkpoint or rather the last one.
all "restart last level after death" does is causing a death to load the current level rather than the map. it's functionally identical to skipping the part where you mash jump on the map to get back into the level as fast as possible. disregarding the bug that autostart events dont run if the flag is enabled.
punishing the player sucks so i hope you don't go too hard on them
I did not intend to visit each player then in front of their pc/mac/laptop and using a whip.
Well, this explains a lot, somehow.
Code: Select all
function onExitLevel()
resetting mem(0x00B2C5AC,FIELD_FLOAT, 3)
end
SMBX wants a "=" there?
Edit: I think I was not supposed to put the word "resetting" in there .. I am trying again
Edit 2: My life counter does not go down anymore now with that. Uhmmmmmmm ....................................
Edit 3:
Ok, this stuff gets weirder if I actually do that
Code: Select all
function onExitLevel()
mem(0x00B2C5AC,FIELD_FLOAT, 3)
Level.exit()
end
in level01 I got a 1up so I finished level01 with 4 instead of the 3 (starter/extra) lifes.
Got in level02 .. life counter shows 3 instead and I ... have unlimited lives again. This really is messed up.
Would this even work in theory now?
if player is in level01 and extra lifes < 0 then clear checkpoint, reset extra lifes to 3 again, restart from level01
if player is in level02 and extra lifes < 0 then (clear checkpoint?), reset extra lifes to 3 again, restart from level01
But from what I understood this is not really something which can be changed from luna. Hmm.