Search Unity

Question Hard game saving.

Discussion in 'Scripting' started by a4chteam, Dec 23, 2020.

  1. a4chteam

    a4chteam

    Joined:
    Dec 22, 2020
    Posts:
    22
    Looking through the methods of saving and loading the game, I came to the conclusion that no method can do this:
    *The bot throws a grenade, the player saves the game with a flying grenade (trajectory, respectively). When the game is loaded, the grenade continues its path along the path that it was originally.
    *The player saves the game while reloading the weapon. When the player loads the game, the animation continues from where it was.
    *When I made modifications to other games, I didn't need to serialize the parameters of the characters and weapons in the modification.

    Any ideas on how to make a "real" save game?
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    You would just need to save the grenade's current velocity when thrown, then load it back for it to continue moving.

    Save the name and current time of the animation being played, then when the game loads, play the same animation starting from the saved time.

    This does seem a bit excessive though.
     
    PraetorBlue likes this.