Jump to content

SaveForReroll and LoadForReroll


Recommended Posts

For some unknown reason the code i used doesnt even work at all

local function RollSave(inst)
	local data =
	{

		livesleft = inst.numDeaths
	}
	return next(data) ~= nil and data or nil
end




local function RollLoad(inst, data)
	print("LOADING FOR REROLL")
	if data.livesleft ~= nil then
		inst.numDeaths = data.livesleft
	end
end

	--this is put in master_postinit of a character prefab
	inst.SaveForReroll = RollSave
	inst.LoadForReroll = RollLoad

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...