How do I Fix This Problem With Compare Variable

Get help using Construct 2

Post » Sat Apr 04, 2015 5:34 am

I need a little bit of help with the Compare Global Variable.
I want to make it so on a controller you can switch the left and right trigger buttons. I made and tested both options and they both work. So all I had to do was a way to switch between the the two so I made this:

Image

When you press the A button it switches between the left and right rigger.
When you press the A button again it doesn't switch back

The event doesn't fire and the variable is not set back to a 0

Image

I'm not quite sure how to fix this or make a work around.

Also here is the .capx if that helps. I modified the code to work with a keyboard cause I know not everyone has a controller.

https://www.dropbox.com/s/eul1p4nvwwv9y8k/Modified%20to%20work%20withkeyboard%20and%20mouse.capx?dl=0
B
4
Posts: 3
Reputation: 206

Post » Sat Apr 04, 2015 6:25 am

change the second subevent to else
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Sat Apr 04, 2015 6:37 am

Hmmm, thanks for the help but it didn't work.
B
4
Posts: 3
Reputation: 206

Post » Sat Apr 04, 2015 7:04 am

Wait. Nevermind it worked there was another piece of conflicting code i forgot to delete thanks.
B
4
Posts: 3
Reputation: 206

Post » Sat Apr 04, 2015 8:25 am

which piece exactly?
B
8
S
2
Posts: 110
Reputation: 923


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher, DrKoala, ketramtu18, XMatrix and 9 guests