I have some - hopefully just configuration - problems here:
Level is a ghost house, main area has a repawnroom as well SOME additional rooms (in complete seperate sections)
Use Physical Boundaries: OFF
Act as Spawn Zone: OFF
Reset Level When Entered: Default
respawnrooms.lua is changed to these settings here:
Code: Select all
respawnRooms.resetSettings = {
-- If true, event timers will reset, layer speeds will reset, and auto-start events will trigger again.
eventsReset = true,
-- If true, section settings (such as background and music) will reset.
sectionsReset = true,
-- If true, star coins will reset when dying if they have not been saved.
starCoinsReset = true,
-- If true, p-switches and the stopwatch effect will be reset when going through rooms (they always be reset when dying, regardless of this setting).
timedSwitchesReset = false,
-- If true, the 4 color switches and the ON/OFF switch will reset when going through rooms (they always be reset when dying, regardless of this setting).
colorSwitchesReset = false,
-- If true, the player's held NPC will be reset when going through a room.
-- Also affects NPCs in Yoshi's mouth.
resetHeldNPC = false,
}
respawnRooms.roomSettings = {
-- Default options for the extra settings of each room.
-- For quicksand, these'll always be used, no matter what.
defaultOptions = {
-- If set, this room will have "solid" walls and a death plane if there isn't an adjacent room.
usePhysicalBounds = false,
-- If set, any NPC's inside will be spawned when the player is in the room, regardless of if they are on camera.
actAsSpawnZone = true,
-- If set, most of the level will be reset (similar to when respawning) when this room is entered.
resetWhenEntered = true,
},
-- If true, the level will be reset at the end of transition and not the start. Doesn't affect non-panning transitions.
onlyResetAtEnd = false,
-- The layer name that quicksand rooms are placed on.
quicksandLayerName = "Rooms",
-- The speed that the player will get (in pixels per frame) when entering the room from the bottom.
-- If 0, there will be no speed boost.
jumpFromBelowSpeed = -10,
-- The type of camera movement for the transition. Can be NONE for no transition.
-- Can be PAN_CONSTANT, PAN_SMOOTH, PAN_SINE, or PAN_QUAD to have the camera move between rooms.
-- Can be FADE, MOSAIC, DIAMOND, ROTATING_SQUARE, DIAMOND_SWEEP, INWARD_SWEEP, or WIPE to have a fade between rooms.
transitionType = respawnRooms.TRANSITION_TYPE.MOSAIC,
-- The duration (in frames) that a camera transition lasts.
panTransitionDuration = 20,
-- The amount of time (in frames) that the screen will fade to black during a fade transition.
fadeOutDuration = 32,
-- The amount of time (in frames) that the screen will fade from black, back to gameplay during a fade transition.
fadeBackDuration = 32,
-- The amount of time (in frames) that the screen will remain completely black during a fade transition. This can be 0.
fadeWaitTime = 0,
}
respawnRooms.respawnSettings = {
-- If true, quick respawn will be enabled. When the player dies, there will be a brief transition and the level will reset without a loading screen.
enabled = false,
-- Powerup that the player will have when respawning.
respawnPowerup = PLAYER_SMALL,
-- If true, respawn BGO's will never be used, and the actual start point/checkpoints will be used instead.
neverUseRespawnBGOs = false,
-- The directions of each respawn BGO.
respawnBGODirections = {
[851] = DIR_RIGHT,
[852] = DIR_LEFT,
},
-- The sound effect played when the player dies. Can be nil, a string, or a number.
-- Default value is 38, which is the birdo spit sound.
deathSound = 38,
-- The amount of screen shake to have when the player dies. Can be 0 for none.
deathEarthquake = 0,
-- If true, the game will be paused while the transition is active.
pauseDuringTransition = true,
-- The type of transition to use.
-- Can be NONE, FADE, MOSAIC, DIAMOND, ROTATING_SQUARE, DIAMOND_SWEEP, INWARD_SWEEP, or WIPE.
transitionType = respawnRooms.TRANSITION_TYPE.MOSAIC,
-- The amount of time (in frames) to wait between the player dying and the transition starting.
deathAnimDuration = 0,
-- The amount of time (in frames) that the screen will fade to black during the transition.
fadeOutDuration = 32,
-- The amount of time (in frames) that the screen will fade from black, back to gameplay during the transition.
fadeBackDuration = 32,
-- The amount of time (in frames) that the screen will remain completely black during the transition. This can be 0.
fadeWaitTime = 4,
}
return respawnRooms
Some screenshots of the WIP level for those who are interested...(one of them might be for further context at least)
Checklist:
I can get hurt within the respawnrooms: yes, good.
I can die within the respawnrooms: yes, good as well.
Respawnroom content respawn when re-entered: yes yes yes,...
NON respawn room areas and sections (which do NOT have these things) content respawn as well: NO! Why?
And despite "colorSwitchesReset = false," also these SMW colored STATES return as like nothing as ever been activated.
I've already come to terms with the fact that these semi-solid floorslopes don't work properly with NPCs and I have to be careful with them, but I absolutely need the respawn rooms for this level.
Please help me out there, otherwise the whole level is for the trashcan.
Edit: Even if I set up an extra respawnRoom with "Reset Level When Entered" to OFF, I feel like, this is not working in the first place, because everthing stil does reset there in that area.
Edit 2:
I absolutely cannot understand what is going wrong. So either everything is packed into a respawn room or somehow nothing. I just can't use the possibilities of this script properly for my purposes.