LooKiCH wrote: ↑Sun Oct 30, 2022 11:47 am
I got that idea indirectly from Emrals checkpoint-gameover "fix". I would be interested to know what you - however - think about it.
Doable? BS? Good idea?
So I wondered if it is possible for you or in general to include some kind of "fallback level" into your script?!
This should be an example of what I mean:
("levellist").levels = {"world1-1.lvlx","world1-2.lvlx","world1-3.lvlx","world1-4.lvlx","world2-1.lvlx","world2-2.lvlx","world2-3.lvlx","world2-4.lvlx","world3-1.lvlx", "...} etc
then a second list, which could be optional
("fallbacklevels").levels = {"world1-1.lvlx","world2-1.lvlx","world3-1.lvlx", "...} etc. which however would build up upon the levellist itself.
MAYBE as support also this:
("fallback-IDs").levels = {1,5,9..}
Let`s say there is some kind of "global variable" there (dunno if this is the right term, however it must be something like that which can be called from any level within the same project/mappack etc.)
On start the value is 0, as the player has not completed any level.
after completing "world1-1" it is 1
after completing "world1-2" it is 2
after completing "world1-3" it is 3
etc.
let`s also say the player goes gameover here, in "world1-3": He has to start over from "world1-1" because 2 < 5 ("world2-1" would be the real first or next fallback level with a value of 5, "world3-1" the next one after that with a value of 9) etc. so, if a player goes gameover within "world2-4" (from previous completed levels the variable would be set at 7, because player complted "world2-3"), the fallback level would be "world2-1", or rather value 5.
Like I said: I don`t know if this is really possible, however, as you were able to "manipulate" the system to create an order of levels, which were about to get loaded, once a previous was completed (instead of returning to the world map), I just thought that you could still manage something like that, as long as it's within luna's capabilities.
AFAIK in SMB on NES when you go gameover you have to start all over, while in the SNES Allstar version you restart from the current world, but this should just support that idea. What do you think about that?
Edit: Here is one more point why I had this idea.
Code: Select all
function onExitLevel()
if player.deathTimer > 0 and mem(0x00B2C5AC,FIELD_FLOAT) == 0 then
GameData = {}
end
end
Let`s say, before this piece of code would be executed, the script would check for the last fallback-level and would store it in the current save file, would that work, or wouldn`t it?