Problem Description
Picking two events modifying one variable, the changes from the first to come will be carried after the second is executed. The changes from the second to come will not be kept outside of its own scope.
Attach a Capx
sta.sh/010tefj7gcwj
Description of Capx
Spite haz boolean.
When boolean True, sprite destroyed.
Two times in the project, the boolean value is changed:
- A first time with no condition: the boolean is set to false.
- A second time, on click, it is set to True.
Afterward, the boolean is checked, and the sprite i or isn't destroyed.
Since the boolean is set to True AFTER being set to False, it should still be considered True afterward by the following events.
It is not.
Steps to Reproduce Bug
- Disable Event 1 and run the project. On click, sprite is destroyed.
- Enable Event 1 and rerun the project. The sprite won't be destroyed anymore.
- Make Event 3 a subevent of Event 2. The sprite will be destroyed again
Observed Result
The action of Event 1 will be carried after Event 2, despite Event 2 supposedly cancelling it.
Expected Result
Event 2 overwrites Event 1 's changes once and for all.
Affected Browsers
- Chrome: (YES)
- FireFox: (YES)
Operating System and Service Pack
Windows 8.1 / windows 7
Construct 2 Version ID
r221