Apparently I have not correctly explained what I am trying to do or I am trying to use soft reference for other purposes.
I have a pump in the game that pumps fluids. The pump is connected to tanks and has In and Out directions. When the pump turns on, it is pumping liquid (resource) from Out to In. The pump is dynamic. The player can buy or sell it, move it, etc. And so, when the pump is running, something like this happens:
(ref) TankOut.Liquid = (ref) TankOut.Liquid - 1;
(ref) TankIn.Liquid = (ref) TankIn.Liquid + 1;
And after loading, I need to restore links to TankOut and TankIn in order for the pump to work correctly. Initially, the TankOut and TankIn refernces are assigned when the player connects the hose.
And I cannot assign In and Out tanks during the respawn event, because tanks may be 0, or maybe 1000, and which one will be In or Out i don’t know, it all depends on the player. I need to restore the link to those tanks that the player previously assigned.
The only way that I see is to assign an ID to each actor for which you need to restore the reference, then after the respawn do “get all actor of class” and check each one for the desired ID. Save the ID with the help of the savior.