0
Answered

Saving/Loading and Quest Reliances

Jacob Falling 3 months ago in Quests updated by Marti (Lead Developer) 3 months ago 4

Hello!

I have a number of scene objects that are activated, deactivated, or otherwise changed when On Quest Status changes. Unfortunately, once the game is reloaded, there does not seem to be  a way to trigger these again via the quests. It appears that once a quest state is Active, neither reactivating it again nor restarting it will trigger actions with the On Quest Status Trigger.

Is this something that can be changed, or is there a recommended least intensive method for replicating these changes after On Load?

Thank you for all your work,

-Jacob

Unity version:
2018.4 LTS
Game Creator version:
1.1.8
Under review

A Quest state can't transition to itself. For example, changing an Active quest to Active, won't trigger the Active Actions again. Here's a graph of the possible transition: https://docs.gamecreator.io/quests/quests/quests-overview.

The problem is that you have a "On Quest Status" Trigger in SceneB that detects when "QuestA" is active, it calls some Actions. But if the activation of the "QuestA" is done in SceneA, then when you load SceneB, that Trigger won't be executed.

I'm not sure what should be the behavior here. Maybe the "On Quest Status" should be executed every time a new scene is loaded. That would solve the problem, but I'm not sure if there would be side-effects.

I'll post later today an update to the "On Quest Status" Trigger with this new behavior so you can try it out and see if it fixes the problem.

As promised, here's a couple of Triggers that override the "On Quest Status" Trigger.


 trigger-quest-status-new.unitypackage

This one will detect when the specified quest has changed its status as well as check the status when the trigger is initialized.

trigger-quest-status-original.unitypackage

This is the original "On Quest Status". If you install this one it will revert back the changes to the original behavior.

Note: After giving it some thought, I don't think it's the right approach this new one. It would be better to use a "On Start" Trigger and use a condition to check the current status of a quest, instead of relying on the "On Quest Status" Trigger to do multiple things at once. Despite this, feel free to use whichever works best for you and provide some feedback.

Marti,

For now, I chose a simple, though not ideal solution. I'm using saving points, so at the moment I am saving the game prior to quest changes, so that all relevant changes based on the quest status changes effectively occur outside the saves. The states (active, inactive) save, but world changes based on the status changes happen between the save points (and those world changes are tracked on their own). Since the game is initially linear, this should work.

A better solution would seem to be more like you're suggesting. Just test against quest states on start. This will mean rebuilding all triggers on the relevant objects. My thought was to create a single manager and send event messages, which I'm doing for other purposes as well -- your implementation of events is very good.

I think we're kind of agreeing that the On Quest Status trigger is basically incompatible for anything needing the save/load functionality. If I had thought about saving when implementing it, it's not the method I would have chosen for this -- I think it's more for one-shot needs like messages, though changing a Global Variable could also be a way to make it work in these circumstances.

...maybe you give us too many ways to do things? Some of us can't handle the power. ;-)

Assuming I'm understanding correctly, happy to call this one answered.

Cheers,

Jacob

Answered

Thanks! I'm marking the ticket as answered. Despite this, I'll give it another thought and see if I can come up with something :-)