on destroyed called when changing layout

Bugs will be moved here once resolved.

Post » Tue Jun 26, 2012 11:22 am

well this is a logic bug, if you have an event in your event sheet:

someSprite -> on destroyed -> restartLayout

and in the same event sheet you have:

on someCondition -> go to OtherLayout


when someCondition is met, layout is restarted, but the game should go OtherLayout. what happens is that the game tries to go to OtherLayout, destroys all objects including someSprite, which on destroyed makes game restart current layout, so the game just restarts current layout :)
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Tue Jun 26, 2012 11:35 am

Can you share a .capx for this? It would help me verify I've fixed the problem.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Jun 26, 2012 11:44 am

http://dl.dropbox.com/u/59009902/go%20to%20layout%20on%20destroyed.capx
after 2 seconds should go to layout 2 with five rotated black squares.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Tue Jun 26, 2012 12:03 pm

Thanks - should be fixed in the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests