Why does...

Discussion and feedback on Construct 2

Post » Sat Sep 08, 2012 6:46 am

If you do you following:

If ObjectX is overlapping ObjectY --> Spawn ObjectZ
                                                    --> Set InstanceVariableZ to 2


*Where InstanceVariableZ acts on ObjectZ

Then farther down the event sheet, you have:

When InstanceVariableZ = 2   --> Set ObjectZ animation frame to 2

The above works as expected. ObjectZ spawns in frame 2 of its animation.

However, if you switch the two on your event sheet, even if nothing else is inbetween, it doesn't work properly.

For me, this causes the "initial frame" to appear sporadically.

I didn't put this into bugs, because thus far I have simply not been knowledgeable enough to understand the issues I've faced.

I'm using updated Chrome, updated video drivers, r102

Thank you!

Edit:

I understand that the engine must run through the entire event sheet again prior to returning to that particular event, it just seems like a bit of an extreme response, considering I would think that even when they are switched, it should only take a single "tick" to correct the flaw. I don't know..teahousemoon2012-09-08 06:49:32
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Sat Sep 08, 2012 3:20 pm

My first thought was 'picking', but I tried the scenario above and it worked. Always best to include a CAPX for the specifics.
ImageImageImage
B
67
S
19
G
124
Posts: 3,214
Reputation: 74,415

Post » Sat Sep 08, 2012 7:29 pm

Can you share a .capx?

When the event sheet is empty it shows the tip: "Events are run from top to bottom". After the bottom of the event sheet the screen is drawn. So if you have them one way round, the object is created, the animation frame is set, then the screen is drawn. The other way round, the object is created, the screen is drawn (before the animation frame is set), then the next tick the animation frame is set. This results in a quick flash of the wrong animation frame for one tick. This is why the order of your events is important.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Sep 08, 2012 7:44 pm

Thank you for your responses, Blackhornet and Ashley!

I would like to have a few minutes to investigate this situation a bit further myself prior to posting the capx, and unfortunately I am engaged by another task that I must complete prior to that. I will return to this post a little later; I just wanted to thank both of you and let you know I am still interested in this.
B
28
S
6
G
5
Posts: 248
Reputation: 5,463


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests