change 8 directions by Letters A,S,D,W,X...?

Get help using Construct 2

Post » Tue Nov 29, 2011 3:29 pm

Please, Im in "Beginner's guide to Construct 2 example and I need to know how to change the 8 directions in my "Player" by keyboard of letters "A,S,D,W,X..."?

thanks muchas gracias

I speak spanish sorry

Gustavo

:)
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Nov 29, 2011 9:16 pm

Easy, make a new event about player pressing say for instance 'W' than make an action that simulates 8Direction up (or which key you would like to simulate). There might be another way but I haven't even looked for it, there might be something in the tutorial section.
B
3
G
1
Posts: 12
Reputation: 599

Post » Tue Nov 29, 2011 9:52 pm

Sorry but I dont undersdant, I go to "Event Sheet 1", after I clicked in "Add event" and after choose "Keyboard" and the condition "Key is down"? the letter "W", but in "Add Action", in "Player" I cant see "8Direction up", I only see in the section 8Direction: Reverse, set deceleration, set ignoring input, etc...

please help me step by step Im really new.
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Nov 29, 2011 10:13 pm

Have you tried changing the 'Default Controls' property of the behavior to 'No', then you could add an event such as:

Keyboard Right Arrow is Down - Simulate 8-Direction Right.

You can use any key you wish for the direction this way.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Tue Nov 29, 2011 10:32 pm

Zenox98 ok now my default controls is "No" but I lost when you say Keyboard Righ arrow is down...
well I go to event and add new event called Keyboard then I go to "Key is down" and then I put for example the letter "W" and I have it: Keyboard - W is down - "Add action".

but I dont no what put in add action?.

sorry my bad english! would you help me? please let me step by step.

Thanks
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Nov 29, 2011 10:59 pm

action - Sprite - Platform (browse the list, these actions have different icon) - Simulate control, and then in the dropdown select the correct control (either right, left or jump).

There are examples of platformers in your install of c2, folder examples. (or from the start page "Browse all examples")Kyatric2011-11-29 23:00:23
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed Nov 30, 2011 5:01 am

now its work thanks kyatric, oh sorry but this dropdown I cant see up and down, I only see right, left and jump.
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Wed Nov 30, 2011 5:47 am

My bad, instead of platform, since it is a 8 direction behavior, it is in
Sprite - 8 directions - simulate control. (the same thing, different behavior, you started with 8 dir, keep with it, delete the platform behavior, you don't need it)Kyatric2011-11-30 05:48:26
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed Nov 30, 2011 7:36 pm

Thanks Jyatric, but I did different see how I did:

in events:
Keyboard - S is down - Player - Set position to (player.x, Player.Y+3)
                      Player - Set angle to 90 degrees

similar with the others letters...

Thanks a lot!

Gracias
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Wed Nov 30, 2011 8:32 pm

It seems to me that your method would set angle to 90 everytime you hit S. What happens when you hit S repeatedly? It's really a simple thing to do, all you have to do is look. I'll give you a step-by-step when I get home tonight, but just take a look through all the actions anyways to get yourself more familiar with the engine. It will really help you out a lot. Also try using all the actions to see what they do and you should be able to come up with solutions to problems much more complex than this :)

*EDIT*

Okay here is what you have to do:

Create a new event -> Keyboard -> On key pressed -> Where it says <click to choose> click it -> Press W -> Press OK -> Press Done

Create an action -> On the very top it says 8Direction, click Simulate control which is in that section -> Where it says control, choose Up.

Voila you now have W control your Up arrow movement. Do that with the rest of the keys and you should be set. I hope this helps you.

*/EDIT*
kiasta2011-12-01 03:03:49
B
3
G
1
Posts: 12
Reputation: 599

Next

Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt, mallorcaredes, Yahoo [Bot] and 3 guests