Jump to content

Recommended Posts

When its actually called

hounded.lua:

 

function Hounded:OnSave()	if not self.noserial then		return 		{			warning = self.warning,			timetoattack = self.timetoattack,			warnduration = self.warnduration,			houndstorelease = self.houndstorelease,			timetonexthound = self.timetonexthound		}	end	self.noserial = falseendfunction Hounded:OnProgress()	self.noserial = trueend
why in "OnProgress" state data wont saved?

according to noserial flag OnSave() will be called twice?

upd:

oh i think i get it:

--call when you have finished a survival or adventure level to increment the world number and save off the continue informationfunction SaveIndex:CompleteLevel(cb)
so point of this is reseting component's variables to init values when jumping to new world? Edited by Rincevvind
Link to comment
https://forums.kleientertainment.com/forums/topic/37072-onprogress-method/
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...