TKGP
Senior Resident
 On forum: 01/25/2013
Messages: 454
|
Script binding objects only persist for the current session. If you want something to last for the entire life of the object you need to inject it into the server packet. You can save/load it manually if you know what you're doing but using xr_logic.pstor_store and pstor_retrieve is much easier, if less efficient. Also, I would put your check in net_spawn instead of update as it doesn't need to be run repeatedly.
if not xr_logic.pstor_retrieve( self.object, "doneRandomWeapon", false ) then
-- Do whatever
xr_logic.pstor_store( self.object, "doneRandomWeapon", true )
end
Or something to that effect.
My mods: http://bit.ly/TKModStatus
My stream: http://www.twitch.tv/tkgp
|