Jump to content

Saving Mod Variables?


Chef Tonberry

Recommended Posts

Was wondering if there was a way to save a variable within a save game.


To give context I have a method that makes a random number when a new game is created, I want that number to stay the same till the end of that save.

 

local function randNumber()
	local randNum = ZombRand(100)
	--saveData(randNum)
		end
Events.OnNewGame.Add(randNumber)

--this is just an example, I would like to know how to save any variable.

Edit: Nevermind I've found an answer, you can delete this post if you'd like.

Edited by Chef Tonberry
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
×
×
  • Create New...