So I am at a loss. I am trying to figure out a way to save timer values on an object to the player file using remote at multiple times to include when they rent out.
So I have an object that has a timer of 2000 tics, when you rent out and come back in the object reverts to the default timer in the object file. I can set the timer value to 0 in the object file and then when the item loads have an otimer trigger set the value to 2000. But then again when you rent and come back in the new timer value is 0.
Is this best done saving the unique id and the current timer to the player file throughout and when renting. Then when entering the game the object checks to reference that the pfile variable uniqueID matches its uniqueID and then pulls the timer value stored and uses otimer to set its new value?
My thought was to do something similar to the below. This would need to be a global random type trigger to ensure the most recent values are saved. Then again at rent. My problem is that the %self.id% changes when renting and coming back in. Ive tried multiple self.uniqueid or self.unique_id but none of them seem to return the unique id associated with the object. This value might be unique to the object files on our codebase, if so I will have to ask the coder.
eval oven_timer %self.timer%
eval oven_id %self.id%
global oven_timer
remote oven_id %actor.id%
remote oven_timer %actor.id%
Of course I will also have to ensure that when you give the object away it rdeletes the varialbles on the character file and then also to account for giving it away when it is in a container and renting with it in a container.
If anyone could offer insight or other stuff to consider that would be awesome, and the best way to do this using the eval/context/global/remote commands because I am totally not super good with all that.
Many Thanks - Hurin