Respawning after changing loadout problem
Ferrum Cerebrum » Devlog
Author: Aaronn Solomon
12/13/2023
The Problem
I wanted to let the player change loadouts after death, and then spawn into the same level when they were ready. However, I kept running into a problem with the previous scene name variable I had. It would keep being reset as soon as I pressed the button to respawn, and I had to clue why.
The Solution
The variable I made was getting reset whenever a new scene loaded because it wasn't indestructible. Whenever a new scene was loaded, the variable was reset to its default. So, by simply moving the variable to my indestructible script, and then using it in my code for respawning, the variable stayed the same across all scenes.
Ferrum Cerebrum
Two bodies. One mind.
Status | Prototype |
Author | GoldMoonStudio |
Genre | Shooter, Action |
Tags | Mechs, Virtual Reality (VR) |
More posts
- Pictures disappeared after building projectJan 29, 2024
- Frustration with images and spritesJan 24, 2024
- Volume value was uselessJan 19, 2024
- Recovering from being sickJan 17, 2024
- Game over and pause menu conflictDec 08, 2023
- HUD window transparency issueDec 01, 2023
- Health component confusionNov 24, 2023
- Credits animation confusionNov 17, 2023
- Level select brokenNov 09, 2023