Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

ActionList after loading seems not work

Hi everyone,
AC 1.69.0 + Unity 2019.2.17f1 on a 2d game.

I try to add an ActionList in "ActionList after loading" in SaveList element of Load menu but it seems not work properly. I tried with a simple Dialogue speech ("load correctly")but nothing happens when I load a game. Instead the phrase appears when I change room. Any ideas?

Thank you very much.

Comments

  • Sorry, my fault: the phrase doesn't appear anywhere. Remain the issue nothing happens on ActionList after loading.

  • What if you replace the speech with an ActionList: Comment Action?

    I can't reproduce such an issue. Let's see a screenshot of your SaveList element's properties, and does the ActionList appear (even for just a frame) in the Status window (enabled at the bottom of the Settings Manager)?

  • edited January 10

    Hi Chris, these are the properties of the menu and element: https://drive.google.com/open?id=1g-4_YW3eN0hyFt2wi2KlQDfKoNVY0n-w

    Then I add a comment in the ActionlistOnLoad and enable "Print Action comments in Console". I wrote "test" as comment, but nothing appears in console.

  • edited January 10

    And this also occurs for you in the latest release, v1.70?

    What if you uncheck Load when click on? The save file won't load, but does the ActionList then run?

  • I made another test: I put a Dialogue Speech as action in actionlistOnLoad, but, this time I unchecked "Load when click on": this time I can see the phrase in game (as for save game when "saved correctly" appears), but the game can't be loaded.

  • I confirm if Load when click on di unchecked the ActionList run.

  • Open up MenuSavesList.cs, and find the line:

    EventManager.OnFinishLoading += OnCompleteLoad;
    

    Insert above it:

    Debug.Log ("Load event added.");
    

    Then find the line:

    EventManager.OnFinishLoading -= OnCompleteLoad;
    

    And insert above it:

    Debug.Log ("Load event removed.");
    

    Re-check Load when click on? and try again. When do these lines appear in the Console, and what are their messages in full?

  • in order appears this one:

    Load event removed.
    UnityEngine.Debug:Log(Object)
    AC.MenuSavesList:ClearAllEvents() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:830)
    AC.MenuSavesList:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:716)
    AC.MenuElement:ProcessClickUI(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:250)
    AC.<>c__DisplayClass29_1:b__0() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:189)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
    AC.OptionalMouseInputModule:Process() (at Assets/AdventureCreator/Scripts/Menu/OptionalMouseInputModule.cs:160)
    UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity2019.2.17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

    and then:
    Load event added.
    UnityEngine.Debug:Log(Object)
    AC.MenuSavesList:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:752)
    AC.MenuElement:ProcessClickUI(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:250)
    AC.<>c__DisplayClass29_1:b__0() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:189)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
    AC.OptionalMouseInputModule:Process() (at Assets/AdventureCreator/Scripts/Menu/OptionalMouseInputModule.cs:160)
    UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity2019.2.17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

  • but in game nothing.

  • and in console, after the two operations above, appear:

    File read: C:/Users/PC1/AppData/LocalLow/imaginarylab/Willy Morgan\WillyMorgan_R02_1.save

    -> AC debug logger
    UnityEngine.Debug:Log(Object, Object)
    AC.ACDebug:Log(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:16)
    AC.SaveFileHandler_SystemFile:Load(SaveFile, Boolean) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:122)
    AC.SaveSystem:LoadSaveGame(SaveFile) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:417)
    AC.SaveSystem:LoadGame(Int32, Int32, Boolean) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:342)
    AC.MenuSavesList:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:756)
    AC.MenuElement:ProcessClickUI(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:250)
    AC.<>c__DisplayClass29_1:b__0() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:189)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
    AC.OptionalMouseInputModule:Process() (at Assets/AdventureCreator/Scripts/Menu/OptionalMouseInputModule.cs:160)
    UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity2019.2.17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

  • and finally:
    The 'Load' menu's 'ActionList On Turn Off' (ExitSubMenu) was not run because the menu was turned off as a result of loading. The SavesList element's 'ActionList after loading' can be used to run the same Actions instead.

    -> AC debug logger
    UnityEngine.Debug:LogWarning(Object, Object)
    AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:25)
    AC.PlayerMenus:AssignMenuVisibility(String) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:3357)
    AC.PlayerMenus:LoadMainData(MainData) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:3172)
    AC.SaveSystem:ReturnMainData() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1323)
    AC.SaveSystem:_OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:592)
    AC.SaveSystem:SceneLoaded(Scene, LoadSceneMode) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:79)
    UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode) (at C:/buildslave/unity/build/Runtime/Export/SceneManager/SceneManager.cs:244)

  • Are you loading a save file located in the same scene as the one you load from?

    Try v1.70, and try also adding the same ActionList to the 3D Demo game - load up the 3D Demo's Managers / scene, and make the Basement scene the only one enabled in the Build Settings. Does it then run correctly?

  • ok, I'll try, thank you.

  • Sorry my fault: there's a custom script that not allow the action after loading. Thank you again for the 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.