How do I use the gamepad joysticks to control an object vel?

Get help using Construct 2

Post » Fri Jul 04, 2014 4:25 am

I want to make a platform game with suport to gamepad.
But, how can I control the character speed with joysticks?
Something like... if I put the joystick just a little bit to the right, the char move slowly.
Thanks.
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Fri Jul 04, 2014 5:51 am

Hi Zathan, did you read and understand the manual entry? https://www.scirra.com/manual/143/gamepad
Let us know which part you're having trouble with.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Jul 04, 2014 6:43 pm

codah wrote:Hi Zathan, did you read and understand the manual entry? https://www.scirra.com/manual/143/gamepad
Let us know which part you're having trouble with.

Yup.. but what I want is not explained. I guess..
As I said, "if I put the joystick just a little bit to the right, the char move slowly" to this direction.
And, of course, the keyboard still works at the same time if the player prefers it.
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Fri Jul 04, 2014 7:13 pm

Here's a quick sample.
You do not have the required permissions to view the files attached to this post.
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,847

Post » Fri Jul 04, 2014 8:04 pm

blackhornet wrote:Here's a quick sample.

Thank you :)
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Fri Jul 04, 2014 11:13 pm

Zathan wrote:Yup.. but what I want is not explained. I guess..


No but you can see you have an axis with values from 0-100 depending on how far you move the joystick, so.. sounds like a relative speed value, with some basic maths.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Jul 05, 2014 3:11 am

I also searched the forums for the same thing you're asking about, but couldn't find anything. Here's the solution I came up with...I doubt it's the best way to do this, but if you only need a few speeds (like sneak, walk, and run), this should work.

(edit) the last command was when I started on the move left commands, it's not finished. The first three blocks are for right analog movement.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 37
Reputation: 276

Post » Sat Jul 05, 2014 3:23 am

Joy wrote:I also searched the forums for the same thing you're asking about, but couldn't find anything. Here's the solution I came up with...I doubt it's the best way to do this, but if you only need a few speeds (like sneak, walk, and run), this should work.

(edit) the last command was when I started on the move left commands, it's not finished. The first three blocks are for right analog movement.

hehe thanks, I was thinking in do something like that :)
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Sat Jul 12, 2014 7:55 pm

Thank you, this is helpful
B
13
S
5
G
1
Posts: 119
Reputation: 2,292


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests