How do I Add touch

Get help using Construct 2

Post » Thu Jan 26, 2017 4:32 pm

Hello all, i have one question...
How to add touch to my game to be playable on mobile, when i go to my game site from mobile it load game, but when i touch Start button nothing happening, this game is Arcade "Capture the Flag" and it have one menu when click START you need to add tank type and to chose map and strategy.. And when click again START (to play game) I need two types of touch controls : 1st to move tank body , and 2nd to rotate turret and to fire... I tried all but i don't know how to add this.. Please help me i can post .capx file here
B
4
Posts: 14
Reputation: 230

Post » Thu Jan 26, 2017 4:41 pm

This is weird, when you add the touch behavior to your project it automatically recognizes touches. If you upload a screenshot of the event sheet that handles touch controls i might be able to see the problem.

Also if you want multi-touch one trick is to use the Nth touch events associated with the touch behavior

Touch 0 = the first finger touching the screen
touch 1 = two fingers touching the screen.

Hope that helps a little
B
6
S
1
Posts: 46
Reputation: 476

Post » Thu Jan 26, 2017 4:51 pm

Message: tenksiml can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I looked now and all working :) only need to add to move and shot, turret rottating when draging with finger on screen, only need to add to to move and to shoot
here is video of game on mobile, you look i need to rotate and fire turret and to move tank

https://youtu.be/of1pRVkkzUU
B
4
Posts: 14
Reputation: 230

Post » Thu Jan 26, 2017 9:12 pm

Ok good glad you figured it out.
B
6
S
1
Posts: 46
Reputation: 476

Post » Fri Jan 27, 2017 10:21 am

Message: tenksiml can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
How to add controls to move tank and to fire, I don't know where to add Sprites for moving and fire
And when I click on Add Event i don't see anything about Touch..

Please help mee :( I really need help i don't know where to put Sprites and other, i can post .CAPX file of my game here @Kyatric or any one..
https://www.sendspace.com/file/u1gxxm (.CAPX File) Please don't clone it
B
4
Posts: 14
Reputation: 230

Post » Fri Jan 27, 2017 4:21 pm

Message: tenksiml can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello all, I stuck in my project... I need two types of touch sprites

1. To control tank body in all ways
2. To rotate tank turret and fire

- I tried to add sprite to Global Layers in my project and add instance in Global Event but nothing happened it not showing.. I tryed all and looked tons of videos but nothing.. Please help mee @Kyatric

https://www.sendspace.com/file/u1gxxm (.CAPX File) Please don't clone it...
B
4
Posts: 14
Reputation: 230


Post » Fri Jan 27, 2017 5:31 pm

Thanks I look on it :) :)

EDIT: I can't find what I need but thanks anyway i posted CAPX file, if anyone have time and want to help mee,
I need this
Image
B
4
Posts: 14
Reputation: 230

Post » Fri Jan 27, 2017 8:02 pm

Examples exist in the How do I FAQ, at the section "Touch" :

ThumbStick example (mouse and touch) - LINK
Another thumbstick/analog pad example - LINK
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,295
Reputation: 70,795

Post » Fri Jan 27, 2017 8:18 pm

@Kyatric I founded one you example there ,,ThumbStick_Example-Revision-8Dir-touch_only.capx,, and i tryed tonight and added to Global Event, and i don't know where to add sprite.. I tryed to add it to Global Layer(where is my HUDS, TANKS, ALL SPRITES) but it don't show in game...
B
4
Posts: 14
Reputation: 230

Next

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 35 guests