Hey, I am currently trying to randomly generate companions at runtime, currently how I am doing it is using an actor that just spawns that charcter and applies the randomness, but I don’t know how to keep that randomness so say I wanted a second companion, my first companion will get destroyed, summons new one, and then when I try to summon the old one it will be a new randomly generated one which makes sense, I just cant see how to store the reference of the character I originally spawned and spawn it again.
You save their randomly generated attributes and apply them when the companion is respawned.
When you spawn the companion, you know whether it needs to be generated from scratch or you’re recalling an existing one. Here you decide how it’s spawned from class - either allow for random generation or use a set of saved variables that define your character.
You need a save game if you need that companion to persists between game sessions. If it’s only for the duration of this one game, it’s enough to store the generated data in variables and feed them to the newly spawned companion.