Forum rules - please read before posting.

Pre-saved checkpoints?

Hey, is it possible to create pre-saved checkpoints in the Unity editor that can be loaded in builds? I'm wanting to create a sort of level-select menu for playtesting/debugging. Typically I would just send the player to the scene with the desired level, but my game is non-linear and the player can backtrack to previous rooms, so that option isn't really possible. Any help would be greatly appreciated. Thanks!

Comments

  • What kind of data are you looking to load? Depending on the amount/type, it may be best to rely on scripting.

    Variables can be assigned presets in the Variables Manager, which are possible to assign in bulk either using the Variable: Assign preset Action, or through script:

    AC.KickStarter.runtimeVariables.AssignFromPreset (presetID);
    

    Inventory items don't have an equivalent, but can be assigned to the Player via the cog menus beside them when in Play Mode. You can also add/remove items through script:

    AC.KickStarter.runtimeInventory.PlayerInvCollection.Add (new AC.InvInstance (itemID));
    AC.KickStarter.runtimeInventory.PlayerInvCollection.Delete (itemID, 1);
    

    The scene can also be changed through code:

    KickStarter.sceneChanger.ChangeScene ("MyScene", false);
    

    Though, it should be said that the most accurate way to have "mid game checkpoints" for debugging purposes would be to create save-game files manually through playing. There's a lot of other data that a save-game deals with that can't be set in a similarly-easy way, such as what a Player's previous scene was etc.

  • It would act pretty much as exactly as saving the game does, but I would do it on my end before sending the build to my playtesters. This wouldn't really be a final feature of the game, but I think my playtesters are getting a little tired of having to re-start the game every time I update it.

  • Porém, deve-se dizer que a maneira mais precisa de ter "pontos de verificação no meio do jogo" para fins de depuração, seria criar arquivos salvos do jogo manualmente durante o jogo. Há muitos outros dados com os quais um jogo salvo lida e que não podem ser definidos de maneira igualmente fácil, como a cena anterior de um jogador, etc.

    Hi, Chris. How would I create save files? Would you use action lists?

    I'm having difficulty creating checkPoints in areas of the game, when, for example, the player passes through an object's trigger and activates the checkPoint.

    Basically I want to save the game progress and the place where the player is when the player passes the checkPoint and if the player leaves the game or gives game over I would like what was saved to be deleted / restored.

  • The Save: Save or load Action can be used to save the game automatically, without the Player having to manually do so.

  • I did it like this;

    In a trigger I put the action ''Save: Save or load'' and in ''onStart'' I put the action ''Save :Save or Load ==>method : Load game ==>Save to load ; auto save ==> selective loading ; I left load player Data marked

    What happens is that it saves the location where the player touched the trigger, but it does not save the events that occurred before such as objects that were placed in the scene, so when the player dies it restarts at the trigger location but the player has to do everything again.

  • AC needs to be informed of what scene data you wish it to save, by way of attaching "Remember" components to your objects.

    See the Manual's "Saving scene objects" chapter for details.

  • edited December 2023

    Something strange happens, when the character dies he appears in the checkPoint area already dead, which shouldn't happen since the game loaded when it was saved before the player's death.

    I did it like this;

    In the actionList that causes the player's death, I placed after the death action the action ''Engine > And game> command: LoadAutosave. to load the saved game at checkPoint
    and the Game loads at checkPoint with the player already dead.

  • You're referring to the Combat Example?

    It's been updated quite a bit recently - are you using the latest version? Backup/duplicate your project and try the current release.

  • The game where I encountered this problem is another 2D game, not Combat Exemple.

  • You'll need to explain the issue in more detail then, as the concept of death is not hard-coded into AC itself.

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.