Forum rules - please read before posting.

QUestion about action list as asset files

Hi Chris, I have a small doubt about using Action Lists as Asset Files.
I have a scene that will be used multiple times; at each visit, the quests change. I thought about creating Action Lists for each “level” of the scene and calling them based on the variable corresponding to the level.

The problem I’m running into is that when I start everything directly from the scene, it works perfectly, but if I start from the main menu and then reach that scene, everything stops, as if the Action Lists no longer have references to the current scene.
The strange thing is that if, instead of starting from the menu, I begin from the “MAP” scene, everything works correctly, even though when I open the Action List I can still see all the references to the scene elements marked as missing.
What could I be doing wrong?
Thanks a lot for your help.

Comments

  • As often happens, shortly after posting it seems I’ve found the source of the problem. In the previous level there are some triggers that I disable using “Send message: Turn off”, as explained here:
    https://adventurecreator.org/forum/discussion/7593/what-is-the-best-way-to-disable-or-remove-a-trigger-after-its-played

    However, this causes an error when changing scenes, namely:

    MissingReferenceException: The object of type 'AC.AC_Trigger' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Object+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at :0)
    UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at :0)
    UnityEngine.Component.get_gameObject () (at :0)
    AC.AC_Trigger._Update () (at Assets/AdventureCreator/Scripts/Logic/AC_Trigger.cs:95)
    AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:268)

    This completely blocks the Player’s movement action in the next level.

  • What is your AC version? A bug that addressed the above error message was addressed in the latest release.

  • Seems that fixed the issue! Thanks. i'll do more tests. Thanks for you help

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.