Order of update calls

For developers using the Construct 2 Javascript SDK

Post » Fri Jan 23, 2015 1:22 am

So, I have received seemingly competing info on pre tick and posttick stuff.

I read through all of preview.js and this is what I see and the order in which it is called:

pretick - -called on all objects that have used pretickMe()
tick - -called on all Behaviors with tick()
posttick -called on all Behaviors with posttick()
tick -called on all objects that have used tickMe()

EVENTS RUN HERE -Event sheets are called and ran.

tick2 -Called on all Behaviors with tick2()
tick2 -Called on all objects in the list having used tick2Me()

Just to clarify, post tick does not occur after events have run but before they run. Ya... anyway... so if you write an AI behavior to control a platformer (uses post tick) you should be aware of where things be!

I am not clear if you can add a behavior to the update list or not (using tickMe() for example) but you can certainly call it on plugins.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest