Resolved [r190][r192] On Click Toggle

Bugs will be moved here once resolved.

Post » Sun Dec 21, 2014 9:12 am

Problem Description
"On Object Click" & "On Object Touch" is only performing first event on first event line it is present.

Attach a Capx
BugReport_Alexixiv.capx Attached

Description of Capx
Left Clicking the box should change color back and forth using left click only but fails. If the event are swapped, it will turn the box red but not back to green. If you set one of the events to "Right Click" it will allow both color changes accurately. This issue exists with "On Object Touch" as well.

Affected Browsers
Only Have Chrome Installed

Operating System and Service Pack
W8 64bit SP2 & W7 32bit SP2

Construct 2 Version ID
r190 and r192
You do not have the required permissions to view the files attached to this post.
Last edited by Alexixiv on Sun Dec 21, 2014 10:43 pm, edited 1 time in total.
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Sun Dec 21, 2014 12:43 pm

This is not a bug: Events are read from top to bottom, so when it is red, you are turning it green, but then it is green.. so rebecome red.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sun Dec 21, 2014 7:07 pm

Aphrodite wrote:This is not a bug: Events are read from top to bottom, so when it is red, you are turning it green, but then it is green.. so rebecome red.


I understand that it is reading from top to bottom, but it should not be performing an event if both conditions aren't true during that loop right?
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Sun Dec 21, 2014 10:41 pm

Adding wait 0 to each toggle event (as suggested by ahrodite) seems to make the logic work.
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Sun Dec 21, 2014 10:48 pm

Better to restructure your code IMO
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 05, 2015 4:29 pm

Closing as not a bug.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests