Dialogue System Trigger - OnLoad ?
Posted: Sun Nov 29, 2015 3:33 pm
Hello Tony,
I have one problem with the design approach to making saves. Namely, let me present it.
I have a bunch of characters, which are affected by an empty gameobject with a trigger. This object has 2 components (my own; but I may use Dialogue System Trigger as well - I tested it), which do 2 things:
1. First, one of that components sends a message that makes all characters (added it to array) sleep on start of the game.
2. Second, the other component sends a message that makes all characters wake up if the player enters the trigger attached to that gameobject.
I can use variable to control whether the action of each components should be run, but the problem is that the action that is to be executed on start (the first component), will be executed anyway, provided I restart the game - because if I load saved game after restarting the game, I am not reloading the scene - just applying stored data. How to remedy this? I don't want to restart the entire scene every time I load, because I expect the player may need frequent loads. Is there something like OnLoad, a trigger via which I could revert what is happening OnStart? I would love to have Dialogue System Trigger to have this kind of trigger.
Best,
Artur
I have one problem with the design approach to making saves. Namely, let me present it.
I have a bunch of characters, which are affected by an empty gameobject with a trigger. This object has 2 components (my own; but I may use Dialogue System Trigger as well - I tested it), which do 2 things:
1. First, one of that components sends a message that makes all characters (added it to array) sleep on start of the game.
2. Second, the other component sends a message that makes all characters wake up if the player enters the trigger attached to that gameobject.
I can use variable to control whether the action of each components should be run, but the problem is that the action that is to be executed on start (the first component), will be executed anyway, provided I restart the game - because if I load saved game after restarting the game, I am not reloading the scene - just applying stored data. How to remedy this? I don't want to restart the entire scene every time I load, because I expect the player may need frequent loads. Is there something like OnLoad, a trigger via which I could revert what is happening OnStart? I would love to have Dialogue System Trigger to have this kind of trigger.
Best,
Artur