How do I change keyboard controlls to touch

Get help using Construct 2

Post » Fri Jun 24, 2016 7:46 am

I want to be able to change from keyboard to touch , now I know about the touch object ect but I their a simple way I can just set to touch?
B
7
S
2
Posts: 105
Reputation: 889

Post » Fri Jun 24, 2016 9:16 pm

make Sprites that look like bottons. and make a touch object. when the player touch the Sprite, then Do this...
B
47
S
18
Posts: 38
Reputation: 3,691

Post » Sat Jun 25, 2016 12:32 pm

okay so i already know that but my player has animations which are pinned via keyboard controls and confusing to change.

Image

Image

Image

okay so you can see that i want my player to move still using the movement animations when touching the arrow pointing up but with touch rather than its current setting "keyboard"
B
7
S
2
Posts: 105
Reputation: 889

Post » Sat Jun 25, 2016 8:32 pm

I think what you're wanting to do is add the touch behavior and the buttons. Then, take each of your commands, make it an "or" block, then add in the new condition. For example:

Keyboard: Down arrow is down => Player: Set direction to "Down"

becomes

Keyboard: Down arrow is down
OR
Touch: Is touching DownArrowObject => Player: Set direction to "Down"

You keep all your old events: you just have to add conditions to them. As an added bonus, I think putting in touch controls like this automatically puts in mouse controls. I THINK.



Eh, Steve!
Eh, Steve!
B
115
S
54
G
13
Posts: 113
Reputation: 16,151

Post » Sun Jun 26, 2016 7:43 am

calebbennetts wrote:I think what you're wanting to do is add the touch behavior and the buttons. Then, take each of your commands, make it an "or" block, then add in the new condition. For example:

Keyboard: Down arrow is down => Player: Set direction to "Down"

becomes

Keyboard: Down arrow is down
OR
Touch: Is touching DownArrowObject => Player: Set direction to "Down"

You keep all your old events: you just have to add conditions to them. As an added bonus, I think putting in touch controls like this automatically puts in mouse controls. I THINK.



Eh, Steve!



Will give this a try, Or perhaps i could upload the capx file and you could implement this for me?
B
7
S
2
Posts: 105
Reputation: 889

Post » Sun Jun 26, 2016 9:40 pm

I'd be happy to, but I have the paid version, so I'm not sure if you would be able to edit what I sent back to you. At the very least, you could look at what I do and duplicate it on your original capx.
Eh, Steve!
B
115
S
54
G
13
Posts: 113
Reputation: 16,151

Post » Mon Jun 27, 2016 9:56 am

I have the paid version just not linked to this account. :)
B
7
S
2
Posts: 105
Reputation: 889

Post » Thu Jun 30, 2016 11:08 pm

Woah, how long was I asleep?!
Just kidding. My laptop charger died, and I had to wait a couple of days for the new one. If you have paid version, all my worries are placated. I'd still be happy help.
Eh, Steve!
B
115
S
54
G
13
Posts: 113
Reputation: 16,151

Post » Sun Jul 03, 2016 10:54 pm

how do i create and upload the pacx file
B
7
S
2
Posts: 105
Reputation: 889

Post » Tue Jul 05, 2016 4:58 am

You save the game as a single file, then upload it to something like Google Drive and post a link in the forums. Don't cut the red wire, and remember, the space mutants fear fire.
Eh, Steve!
B
115
S
54
G
13
Posts: 113
Reputation: 16,151

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests