Subevent Bug

Bugs will be moved here once resolved.

Post » Tue Apr 03, 2012 9:10 pm

Hey guys,

i guess i just found a bug. In my example i have a global variable (nummeric but should be handeled as bool) which is default set to 1. If you click a button this variable will be set to 0. If you click this button again this variable should be set to 1 and so on... very simple.

Now to the bug i've found: Depending from the order of the sub-events, this variable will only change once. But enough the words, see yourself in my example file: http://dl.dropbox.com/u/9431499/Subevent.capx

Hint: The click on the button will be triggered, but nothing happens. The mouse object also doesn't make difference neither does a sprite object.

Hope you can help me out here :)
B
3
G
2
Posts: 2
Reputation: 1,083

Post » Wed Apr 04, 2012 12:01 am

This is not a bug, its a logic error with the order of your events.

Does foo = 0? Yes, so set it to 1.
Does foo = 1? Yes, it just got set to 1. So set it back to 0.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Wed Apr 04, 2012 12:15 pm

Thanks, you're right.
B
3
G
2
Posts: 2
Reputation: 1,083


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests