Pick Object Help..was working with Ver Construct0972

Post your own tutorials, guides and demos.

Post » Sun Oct 26, 2008 3:51 am

I am not sure what happend. This was working ok with Construct 0972. The number tags for the tanks are not showing up and picking by number is not working now.

I upgraded to Construct 0976 so I can change the the sound to the new sound system, but it seems a lot more has changed. That broke my CAP.
B
15
S
10
G
8
Posts: 107
Reputation: 4,944

Post » Sun Oct 26, 2008 4:35 am

I fixed it by moving all of the actions in the "For Each Tank" loop into the action where the tanks are created. The way you had it, each tank's ID was being set to the final LoopIndex(8). Hope that helps. :)
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Sun Oct 26, 2008 6:36 am

Thanks linkman2004,
I did the changes you said and that does fix my problem. I just wish I knew why it was working on the older build of Construct and not the newer one.
B
15
S
10
G
8
Posts: 107
Reputation: 4,944

Post » Sun Oct 26, 2008 3:51 pm

In a recent build a crash was fixed which required that newly created objects don't really "fully exist" until the next event tick. You can use them in the same event that created them, but the next events won't treat them as existing until the next tick. It's a bit of an annoying quirk but it seems it's the way the engine has to work, in order to avoid other crashes in the event engine that have been reported. In this case, the 'For each' subevent to the start of layout event will not consider the tanks created in the same tick, but the 'for 1 to 8' loop will. As Linkman pointed out, you can do everything in the same event anyway.

As a side, you don't need any of the for-each loops in the 'Pick tank' groups. The conditions work like that normally.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Oct 26, 2008 4:31 pm

Thanks Ashley for clearing that up for me.
B
15
S
10
G
8
Posts: 107
Reputation: 4,944


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest