It's simple, setting a value to an instance varaible does not work. When I create a Sprite, on its On Create I call function with its UID. With this UID I want to change a value of a variable, but it seems that it doesn't work. I putted another action to that sprite to check if it was not being picked, but with Destroy action(for example) it works. Also i save the X coordane and Y to a global variable and that works well.
The Spire is called "PuntuacionObtenida".
Attach a Capx
Description of Capx
I took a flappy bird template, you control a bat and insects come continuously from right to left. When a insect collides with the bat a number is spawed.
Steps to Reproduce Bug
Just ensure the bat eats an insect (but also take into account not to eat more than one, because changing the instance variable must only be done for the first number that appears). The variable bOriginalFusion remains 0 (despite setting it to true).
You can disable the toggle in the destroy action and you can check that the number does not appear or see that the X and Y global variable have the sprite X and Y values.
The variable bOriginalFusion remains 0
The variable bOriginalFusion must be 1
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES)
Operating System and Service Pack
Windows 7 Ultimate Service Pack 1 64 bits
Construct 2 Version ID