Having certain events enabled in the code even if no actions are triggered by these events, changes the way other events behave, may they be in completely event sheet.
If a "pick with UID" is in the same event as a loop, it doesn't always pass the right UID to all of its subevent.
Attach a Capx
Compact : sta.sh/025e3kk223cf (as little code as possible)
Expansive : sta.sh/0n24fz9hycm (more mechanics of the bug explained inside)
Description of Capx
There are two Blue sprites, with UID 0 and 1
A loop picks Blue-0 everytime it repeats, and make it transparent when certain conditions are met.
Blue-1 is ignored by this loop, and does nothing.
Steps to Reproduce Bug
- Start "or-bug.compact.capx", drag and drop the two Blues around the place
- -> Blue-0 becomes transparent when placed outside of the lower-right quadrant of the layout
- -> Blue-1 stays opaque no matter what.
- Enable Event 2, and restart the project.
- -> Blue-1 now becomes transparent when placed in the top half of the layout. It shouldn't.
- Change the order of the conditions in Event 4
- -> Blue-1 now becomes transparent when placed int the Left half of the layout.
► Event 4 is the subevent of "Pick Blue with UID 0", it should only ever affect this instance of Blue
► When the bug is enabled, if the first condition of Event 4 is true, it may affect other instance of Blue than the picked one.
► Event 4 is affected by this bug because :
- Its mother-event "Pick with UID" is also a loop.
- It is an -or- block
► To Enable the bug, you also need Event 2, which one :
- Is placed before the loop
- Is a subevent
- Is an -or- block
- Has at least one condition enabled, which compare one of the following properties in Blue :
X, Y, Eight, Width, TextVariable, Animation, any form of Pick
- Has no condition enabled that would compare anything but one of these properties.
- Chrome: (YES)
- FireFox: (Not Installed)
- Internet Explorer: (Not installed)
- Chrome: (YES)
Operating System and Service Pack
Construct 2 Version ID
r216 & r219