On axis release

Get help using Construct 2

Post » Sat Apr 30, 2016 9:28 pm

Hello community,
I was wondering is there any function for the gamepad axis that detects when you release it, like on key release for the keyboard.
The only solution I can think of is comparing "if(left analog x axis == 0)" and then use a timer to stop it. But is there a easier way around this problem?
B
8
S
1
Posts: 10
Reputation: 412

Post » Sat Apr 30, 2016 11:23 pm

Use a variable, it's better i think.

Condition 1 :
- Gamepad left analog X and Y axis not equal 0 -> set Variable = 1

Condition 2 :
- Gamepad left analog X and Y axis equal 0
Sub condition - Variable not equal 0 -> set Variable = 0 and put other action you want
B
18
S
7
G
1
Posts: 56
Reputation: 3,000

Post » Sun May 01, 2016 4:42 am

You are right, thanks!
B
8
S
1
Posts: 10
Reputation: 412


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests