Announcement

Collapse
No announcement yet.

Saving variables in a blueprint to a save game slot

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Saving variables in a blueprint to a save game slot

    I know how to do a basic save game...but I'm scratching my head trying to figure this one out:
    I have a level where the player can click a button on the map to spawn a "camera location" blueprint. In that blueprint are two variable: Actor Transform and Name.
    We place a few preset camera views in the scene, but the player can set new views too. So, the player can roam around the level and add custom views. This spawns the "camera location" blueprint and adds it to the array of preset cameras. It adds an icon to the map and the player can click the map icon to return tho those views. This works like a charm.

    However, I want to save those user views to a save game. In my character BP, I have the "camera location" blueprint array save to a slot. The actor references save, but not the transform or name inside the actors. Does the save game not store the variables within the actors I'm saving?

    Any advice?
    Tracey White - Senior Design Visualization Artist / PC Game Enthusiast / Drummer
    My Maze Game development video series
    My Maze Game Blog

    #2
    How the 'SaveGame' system works:

    You create a SaveGame object.
    Inside you add "mirror" variables of values you need to save.
    Copy "real" values to mirror values then write the SaveGame object to disk.

    You have to copy each variable manually.
    Trying to save Objects or Object Reference won't work, Unreal will just ignore you there.

    Only "primitive" value types are supported by the built-in system (int, float, vector, struct, etc).

    Again: objects will NOT save*. (Epic must clarify this in their docs).


    * In my Savior2 plugin saving Actor References, Sets or Maps of Actor References does work tho
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      #3
      If I'm getting this right..

      All I I need to do is create mirror variables of the ones I need saved . When I trigger the save simply update the mirror variables according to the real ones?

      Comment

      Working...
      X