PrisonLove
Hard Realist
- Reaction score
- 78
Hero won't load from game cache
My hero isn't loading from the game cache, it's just creating the default hero and I have no idea why.
Here's the trigger I use:
I use to save him in the previous chapter and all variables were set appropriately.
I have the create a default Mario in the event that someone wants to go back to the campaign and replay a level higher than level 1.
My hero isn't loading from the game cache, it's just creating the default hero and I have no idea why.
Here's the trigger I use:
I use
Trigger:
- Game Cache - Create a game cache from MarioCampaign.w3v
- Set GameCache = (Last created game cache)
- Game Cache - Store Mario as Mario of Heroes in GameCache
Trigger:
- load mario
- Events
- Map initialization
- Conditions
- Actions
- -------- Load Mario from previous Chapter --------
- Game Cache - Create a game cache from MarioCampaign.w3v
- Set GameCache = (Last created game cache)
- Set TempPoint = (Center of MarioLoadZone <gen>)
- Game Cache - Restore Mario of Heroes from GameCache for Player 1 (Red) at TempPoint facing 90.00
- Set Mario = (Last restored unit)
- Custom script: call RemoveLocation(udg_TempPoint)
- If (Mario Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
- -------- Create a Default Mario --------
- Set TempPoint = (Center of MarioLoadZone <gen>)
- Unit - Create 1 Mario for Player 1 (Red) at TempPoint facing Default building facing degrees
- Set Mario = (Last created unit)
- Hero - Set Mario Hero-level to 2, Hide level-up graphics
- Custom script: call RemoveLocation(udg_TempPoint)
- Game - Display to (All players) the text: Default Mario Creat...
- Events
I have the create a default Mario in the event that someone wants to go back to the campaign and replay a level higher than level 1.