How do I make sure c2 has finished loading?

Get help using Construct 2

Post » Sun Apr 08, 2012 1:09 pm

Take this capx: LINK in this CONTEXT

Is there any way to make sure that c2 has finished any of its internal stuff (like scaling, stretching the sprite and so on)?

Before telling me that it already does on start try my capx you'll see that in reality c2 still does stuff way after on_start.

Thanks
B
30
S
9
G
6
Posts: 525
Reputation: 8,329

Post » Sun Apr 08, 2012 4:31 pm

I think the Anchor behavior takes a tick to update the sprite position. Try using 'Compare two values' to test tickcount = 2 as an alternative to 'Start of layout'.
Scirra Founder
B
383
S
225
G
86
Posts: 24,119
Reputation: 190,551

Post » Tue Apr 10, 2012 11:11 am

@Ashley sadly the tickcount doesn't reset each layout so after the first one, I need a solution that resets each layout.
B
30
S
9
G
6
Posts: 525
Reputation: 8,329

Post » Tue Apr 10, 2012 4:21 pm

So store the tickcount on start of level in a global variable and compare tickcount = globalvar + 2.
Scirra Founder
B
383
S
225
G
86
Posts: 24,119
Reputation: 190,551


Return to How do I....?

Who is online

Users browsing this forum: ismael123, MTR, tikuna and 12 guests