How do I get the return button to work?

Get help using Construct 2

Post » Wed Mar 12, 2014 9:15 pm

I am trying to use the return key 3 times in my program. The first time, it works fine, but after that it throws it out of wack. I am trying to make it so the user can either click a button or press the return key. When the return key gets pressed again, the style is messed up and about 5 steps get missed. How can I solve this?
B
2
Posts: 3
Reputation: 156

Post » Wed Mar 12, 2014 9:39 pm

Can you post a screenshot of this code lines? It would be easier to understand where the issue is.
B
10
S
2
Posts: 135
Reputation: 1,090

Post » Wed Mar 12, 2014 10:01 pm

Well I have these three conditionals

if
nextLayer on click
or
keyboard on return released
then ....


addItem on click
or
keyboard on return released
then...


addPayment on click
or
keyboard on return released
then..

my program is kind of like a website. The first one works fine, but when I get to the second one and press enter, it seems to go through the 3rd and 1st one too. I tried to do this:

if
canClick1 = true
and
(nextLayer on click
or
keyboard on return released)
then ....

canClick2 = true
and
addItem on click
or
keyboard on return released
then...

canClick3 = true
and
addPayment on click
or
keyboard on return released
then..

I thought this would work because maybe all of them were getting called at once because of the or statement, but this didn't work and the problem was still there.
B
2
Posts: 3
Reputation: 156


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests