I there,
I've encountered a problem using an "Else" expression.
Basically I have :
[quote:2hrbkc1c]Global Number variable = "1"
IF (variable = 1)
--> Key "Enter" is pressed --> Call Function Addtodebug "AAA"
ELSE
--> Key "Enter" is pressed --> Call Function Addtodebug "BBB"
Problem is : if I press Enter... I'll see "AAA BBB" in the debug text box oO
I've been using construct 2 for a while now, and this really surprises me. Why doesn't the "Else" expression filter the keyboard input there ?
Also it seems to bypass everything else in the "Else" subevents because if I add this :
[quote:2hrbkc1c]IF (variable = 1)
--> Key "Enter" is pressed --> Call Function Addtodebug "AAA"
ELSE Call Function Addtodebug "Random Text"
--> Key "Enter" is pressed --> Call Function Addtodebug "BBB"
If I press Enter... I still see "AAA BBB" in the debug text box. The "Random Text" part never appears.
And to put the nail in the coffin : everything works PERFECTLY if I'm using a Gamepad and Gamepad inputs. Thus :
[quote:2hrbkc1c]IF (variable = 1)
--> On gamepad 0 Button A is pressed --> Call Function Addtodebug "AAA"
ELSE
--> On gamepad 0 Button A is pressed --> Call Function Addtodebug "BBB"
We see "AAA" in the debug box as expected. The Else statement works just fine.
Does this mean all inputs are not considered equal ? How are keyboard inputs different from gamepad ones ?
A simplified CAPX illustrating this conondrum can be downloaded here : mediafire.com
Thanks in advance for your help, I lost a few hours isolating this problem and I'm scratching my head as to why it doesn't work <img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarrassed" />