Walk not just with arrows, also with WASD

Get help using Construct 2

Post » Wed Feb 24, 2016 3:05 pm

So its a long time ago I made the walking events for my main character. Its just:
When left arrow pressed:
- Player set mirrored
- Set animation "Walk" (play from beginning)
Thats works fine. But I think it would be nice to also make the WASD movement.
Is there a easy way to combine it with my first "arrows" movement or how can I do it?
I already tried an extra event like this:
When W pressed:
- Player set mirrored
- Set animation "Walk" (play from beginning)
But here he just goes into the right animation but he doesnt walk...
Best way would be something like this: When left arrow OR w pressed: ....
Thanks guys!
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Wed Feb 24, 2016 3:30 pm

add another condition where if you press a,s,d,w the player will move just the same as the arrows
now you should have 2 conditions to meet if the player presses (left arrow & A key) moves left
on the event right click to the very left of the 2 conditions and make the condition an OR condition making it (left arrow OR A key) move left
something like this shouldn't add a lot to the events
B
4
Posts: 2
Reputation: 204

Post » Wed Feb 24, 2016 4:15 pm

Okey thats sounds nice but I have the problem that my charakter walks correct with the arrows (maybe thats default)
but with the "A" he just sets the animation and stuff, but he doesnt move.
- Player set mirrored
- Set animation "Walk" (play from beginning)
Thats my event for the arrows and it works. Is there another action that I need for the WASD buttons?
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Wed Feb 24, 2016 5:10 pm

I think I know what is missing

add an action like e.g.
obj_player simulate pressing left

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Wed Feb 24, 2016 6:01 pm

Yeah something like that but its not working :/
Now I have it made exactly like this: On "A" pressed
- Player set mirrored
- Player set platform maximum speed to 400
- Player set animation to "Walk"
- Player simulate platform pressing left

But its not working... ^^
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Wed Feb 24, 2016 6:45 pm

Here I thought I made it!

http://www.pic-upload.de/view-29840163/ ... e.png.html

Now its working with the "left arrow" but not with the "A"! Why! ^^ Pls guys help me ^^
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Thu Feb 25, 2016 7:35 am

all you need to know is https://youtu.be/qfMcaCN7BaY?t=697
Here the standard keys are deactivated (plattform behaviour)
Last edited by fm4fanAT on Thu Feb 25, 2016 10:41 am, edited 1 time in total.

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Thu Feb 25, 2016 9:29 am

You should disable default keys too when doing this.
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Thu Feb 25, 2016 10:33 am

emoaeden like he says disable default keys in left hand PROPERTY
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

Post » Thu Feb 25, 2016 1:22 pm

Okey thanks guys! One last question, ist there something like a command where you could say if there comes a user input "W", make exactly the same like if he would press "Up arrow". Somethin like a pointer on my "Up arrow" event. If he press "W", make the same event as he would press the "Up arrow" ^^ If you know what I mean :P
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 40 guests