Scene Event doesn't trigger on Load

Announcements, support questions, and discussion for Quest Machine.
Post Reply
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Scene Event doesn't trigger on Load

Post by toficor »

Hello,
So when I use your method

Code: Select all

SaveSystem.LoadFromSlot(0);
for loading level, after load stuff like position, quest state etc. are correct but quest state does not trigger SceneEvent of current loaded node that should be triggered when node is active.

Below is my save system and quest machine singletons setup.
saveSystem.PNG
saveSystem.PNG (67.3 KiB) Viewed 861 times
questMachine.PNG
questMachine.PNG (76.29 KiB) Viewed 861 times

Am I missing something?

Best regards, and Thank you in advance.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scene Event doesn't trigger on Load

Post by Tony Li »

Hi,

When you reload a saved game, quests in the player's quest journal will not re-run their scene events or other actions. For example, imagine a quest where an NPC gives the player a unique magic sword to slay a dragon. You wouldn't want to re-run the action and give the player another copy of the magic sword every time they save and load the game.

Instead, use saver components to save and load the world state (e.g., inventory, or spawned bosses, etc.).
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Re: Scene Event doesn't trigger on Load

Post by toficor »

I see, I've tried your saver solution and it works great, as always thank you for you help :)
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scene Event doesn't trigger on Load

Post by Tony Li »

Glad to help!
Post Reply