I create Global variable before for game timer and it work perfect. Now I try to make global variable for menu but have much trouble.
My menu screen have a XBOX 360 controller icon (C1) in middle of menu. When user push left on left analog stick, the icon move to the left. When the user press right the icon moves back to the right.
The left side of the screen has a boundary, and the right has a boundary.
When the 360 control icon collide with left boundary it's supposed add 10 to global variable value.
What I having trouble with is, I want the A button to be deactivated until and only when C1 collides with Left Boundary, so that state of collision is remembered and when A is pressed it will add another 10 to Global Variable equaling 20 and make game go to new layout. I have try several conditons and events but cannot get it to work. Right now, it goes to new layout if I just press A without colliding, or if I just collide with left boundary without pressing A it goes to layout.
Can you tell me what I do wrong in code? I much appreciate