When a new game starts I have certain triggers to walk the player through some Dialogues and Conversations with a few other camera movements,
Once these have played, what is the best way to ensure they are not played again, even if the player goes back to them?
I did an Object Add or Remove at the end of the Action and get this Warning (Unsure how harmful it is this way)
The ActionList 'WelcomeToLvl1' is being removed from the scene while running! Killing it now to prevent hanging.
Comments
What's the best way to disable a trigger permanently once it has been executed? Checking a variable in the action list itself isn't a good solution since it interrupts walking players to stop just to do nothing (if "when running" is set to "Pause Gameplay")?
It would be great if the trigger would stay turned off once the player re-entered the same scene (if the Remember Trigger component was added), or if there was an action that could enable/disable a trigger permanently.
And while my game utilizes player-switching, the trigger that is turned off is enabled again upon reentering the scene, even without switching players.
Unity version: 2018.2.6
AC version: 1.64.5
The issue occurs both in the editor and in builds (PC, Mac & Linux standalone on Windows 10).
Saving the game with the trigger set to off and then loading it worked fine - the trigger remains off. However, if the player then leaves the scene and reenters the same scene, the trigger is enabled again.
And here's the result of the trace (after having turned the trigger off,leaving the scene, clearing the console and reentering):
So the load trace messaged doesn't seem to execute...
Update: Debugging the code I found the reason:
It turnes out thet RememberTrigger.LoadData() was called, but its call to Serializer.LoadScriptData() returned null. The reason is that the second scene activated FileFormatHandler_Xml as the active file format handler.
@ChrisIceBox - I'm sure you're wondering why the second scene switched file format handler?
Well it was an artifact that was mistakenly left over from an attempt of achieving this:
https://adventurecreator.org/forum/discussion/6894/optimizing-compile-time
I have tried many attempts to move AC into its own assembly in order to be able to compile my own code separately from that of AC, but none of my attempts has ended up working in any reliable way.
My absolute #1 ask for AC would be to be able to keep its code separate from my own, optimally through being able to keep it in a separate assembly. Feel free to inbox me if you would like to discuss the possible benefits of this and why all my attempts so far has failed
Thanks!
Thanks for the help!
Regarding moving AC to another folder. That doesn't solve the problem of compilation times (even when using separate assembly definition files from what I seen). Putting AC in its own separate assembly solved everything though, only it requires changes to the AC code.