Changing player speed when using 360 controller?

Get help using Construct 2

Post » Fri Jun 12, 2015 9:12 am

Hi,

I'm using a 360 pad to control my payer's 8direction movement this way:
Image

When player press 'A' I want to increase the speed of the object for a certain time, but I cannot find the way to do this.

Could anybody help me?

Thanks!
B
12
S
2
G
1
Posts: 32
Reputation: 756

Post » Fri Jun 12, 2015 9:49 am

https://www.scirra.com/manual/167/timer

Set speed up, start timer, when timer finnished set speed back to default.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Fri Jun 12, 2015 10:43 am

Thanks, deathangel1479, but I cannot made it work. When I press 'A' button player slowns down it's speed to almost 0 :?

Image
B
12
S
2
G
1
Posts: 32
Reputation: 756

Post » Fri Jun 12, 2015 11:21 am

Must have to do with 8D.Vector.
For me with 8D direct it works.
Hmm...

May be you need to aduste speed, too.
You have low values in 8D.Vector, true? 8D.Vector is pixels per second.
Play a bit around with...

If you have the result pls post, will need it later, too. :D
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Fri Jun 12, 2015 1:23 pm

from my experience, your speed is way too low for 8D. try setting up speed max to 3000 to test.
Check out the demo of my first C2 Game
https://www.scirra.com/arcade/other-gam ... n-demo-482
Follow me @84Gamestudio
B
16
S
5
G
2
Posts: 24
Reputation: 2,816

Post » Fri Jun 12, 2015 1:40 pm

Goomba wrote:from my experience, your speed is way too low for 8D. try setting up speed max to 3000 to test.


I don't think it's a low speed value problem. It works OK when I play with the keyboard.

It must be something about direction vector values, as deathangel1479 said.
B
12
S
2
G
1
Posts: 32
Reputation: 756

Post » Fri Jun 12, 2015 3:26 pm

I kind of solved it creating a global variable "vel" that multiplies vector X and Y components and changing it's value using timer instead of changing 8direction speed.
B
12
S
2
G
1
Posts: 32
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: marc254 and 2 guests