Forum rules - please read before posting.

Can't reset the game correctly

Hello! I am having some difficulties on reseting the save game, At the end of the game, I tried to run an action when the game ends, like the image below:


The game changes to MenuScene, but when I click Play the game starts from the last state that I played, and not from the beginning.

I tried something else, that is doing the reset game by code, like this:


The "ResetGame" object is the Cutscene game object that runs the ActionList above, by doing that in the code the reset game works correctly but when the first conversation of the game is going to appear, the game freezes, there is no exceptions or errors, but anything I click has no effect. Am I doing something wrong?

Comments

  • Chris and everyone, some additional info that can be helpful:

    - The version of the engine is the most recent one, 1.51f
    - After calling RestartGame, the game goes to the specified scene as expected (MenuScene in our case)
    - I have checked the game variables on the AC Game Editor, and they were all resetted
    - The game goes to its normal flow correctly, but when the first conversation (it has two options) was to be presented, nothing shows up. The game is not exactly frozen, since all animations are still happening on the sprites, but no user input is accepted from this point on.
    - No Exceptions or other errors have been registered on the console

    I was trying to debug the Conversation.Interact() method on AC code, and it seems that the game entered the method as expected, but then again, nothing happened.

    Thanks for the replies in advance, and let me know if you need any other info!
  • Guys, I work here with Vinicius, and found some other interesting facts about this issue. We have turned on the "List active ActionLists in Game window" setting, and got the following results:

    - The first time the game runs, the game state goes to DialogOptions and the options are presented correctly:


    - After the RestartGame, when the game gets to the point of that dialog, the game state and the conversation options appear to be the same, but the options are not displayed:


    Thanks!



  • Thanks for the detailed info on this.  If there is an issue with the Engine: End game Action, it's better to fix that than try to workaround it with scripts.  Stick to that if you can and let's debug the issues.

    Your first post mentions clicking Play, "the game starts from the last state that I played" - what do you mean by this?

    The Conversation issue could be due to two things:
    1. Both dialogue options are disabled so neither will show
    2. The Menu that displays your dialogue options is locked - you should get a Console message about this.

    Before you re-run this Conversation, manually run a new Cutscene that enables the options and unlocks the Menu.  Are other Menus correctly showing?

  • We discovered why this problem is occurring, on one of the last scenes of the game I was changing scene by Application.LoadLeve(), instead of using Kickstarter.sceneChanger.ChangeScene(), and because of that the conversation just didn't work, but now it's back to normal.

    Thanks!
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.