Change speed of 8-direction movement in game

Get help using Construct 2

Post » Sun Jan 05, 2014 5:35 pm

Hello again.

(sticking to keys for now, I might change later on)

I want to be able to press one key to speed up the paddle movement (breakout style game) and once that key is released the paddle returns to its normal speed.

I have tried to do like this:

On Left key pressed --- Simulate 8 direction pressing left
    subevent: Keyboard ctrl is down --- set 8 direction speed to 700

(I also wrote second event below to read the released key to restore to normal speed but I deleted it)

It didn't work.
I have added another action to the ctrl key to verify so that the keys works and it does. So I must be doing something wrong with the 8 direction?

B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Sun Jan 05, 2014 5:38 pm

Have a nice max speed, and play around with acceleration.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Jan 05, 2014 6:22 pm

Thanks, I am going to try out now.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Sun Jan 05, 2014 6:35 pm

I experimented with acceleration but I dislike how it "continues" to go even when the key is released.

Or maybe I am daft. ;)
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Sun Jan 05, 2014 7:08 pm

There is also decelleration ^_^

Use the max speed as your variable (to increase with level etc)

Use high values for both acceleration and decellaration :)lennaert2014-01-05 19:10:13
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567


Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, gamecorpstudio, NECRONOMICRON, plinkie and 25 guests