What am I missing?

Monkey Targets Forums/Flash/What am I missing?

Brucey(Posted 2011) [#1]
Is this the wrong name for OnUpdate, or is something else broken?
	Method OnUpdate:Int()
		Print "OnUpdate"
		Return 0
	End Method

because nothing prints...

OnCreate and OnRender both work fine :-(

(version 30)


Warpy(Posted 2011) [#2]
Have you done SetUpdateRate in OnCreate?


Brucey(Posted 2011) [#3]
Damn... I knew I would have to read the docs at some point! Thanks!

Note that OnUpdate is only called if SetUpdateRate has been called to start the update timer

Kind of makes sense when it is put like that...

Time to have a proper rummage in the docs...


Warpy(Posted 2011) [#4]
I think I made the case in beta for SetUpdateRate having a non-zero default value...


Brucey(Posted 2011) [#5]
And the case that everyone read the docs, is probably up there too...

But yes, I can't imagine a typical situation where you wouldn't be updating and rendering.


therevills(Posted 2011) [#6]
A few times this has got me :)