Date's Adventure Touch Control

Get help using Construct 2

Post » Sat Jan 28, 2012 10:19 am

Hello Scirra forum :)

I'm trying to use the touch object in this level
http://dl.dropbox.com/u/52040403/Date%27s%20Adventure/index.html    
of date's adventure, but i don't know how i tried to read the manual and the tutorials but its not working also :(. Can any one helps me with that?

By the way the player has only "scroll to" behavior and it's always attached to another sprite that has the "platform" behavior.

Thanks in advance and wish u all a great day :)

Mina.mina2012-01-28 10:22:44
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Sat Jan 28, 2012 8:44 pm

IIRC, touch is for phones, IMO: keyboard keys+touch wouldn't work very well unless it's for devices with slide out keyboards.

What are you trying to achieve with touch? That'd probably be a good start on how you could be helped. :)

edit: rex has an awesome touchmouse behavior that will help debug touch commands on the PC. Khaz2012-01-28 20:49:22
B
11
S
3
G
2
Posts: 110
Reputation: 2,410

Post » Sun Jan 29, 2012 8:48 am

What is it about the Touch object you need to know?

Have you looked at the posts under the Touch heading in the How Do I faq?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,838
Reputation: 48,277

Post » Sun Jan 29, 2012 6:55 pm

@Khaz I'm trying to make it possible for android and ios users to access the game from their phones and play it using the touch plugin. That's what am asking about "rex behavior" how to use it in the game to control "right, left, jump, double jump and the bottom directions".
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Sun Jan 29, 2012 7:07 pm

@zenox98 I looked at the How do I faq and tried to use the touch behavior but its not working in the right way with me. I'm trying to make the player "who has only scroll to behavior and attached to another platform behavior" able to run left and right, jump, double jump and sit.

Can u help me with that by creating an easy example describing the touch controls for an easy platform game.

Thanks :)
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Mon Jan 30, 2012 3:44 am

http://xanderbot.site50.net/touch/

http://xanderbot.site50.net/touch/touchcontrol.capx


The only thing you really need to do is include some 'physical' buttons for your player to be able to touch.

Hope that's what you meant. :)Khaz2012-01-30 03:46:30
B
11
S
3
G
2
Posts: 110
Reputation: 2,410

Post » Mon Feb 13, 2012 7:55 am

@Khaz Thanks a lot... I really appreciate ur help, but in ur example when i press the right arrow "for example" it just move one step so i need to press release press release to make him walk. Can i make it running by just press the arrow once and stop when i release it.

Thankssss.
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Mon Feb 13, 2012 8:19 am

@Mina, replace the "on touched" events with "is touching object" events.
Also, if you set the touch object property "Use mouse input" to yes, you can get rid of the mouse object and the events regarding the mouse control.

In the end it should look something like this :
Kyatric2012-02-13 08:20:30
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,998
Reputation: 57,786

Post » Mon Feb 13, 2012 8:30 am

Yes as Kyat said, "on touched" will trigger a single touch. If you want it to continue to be active as the player presses, you must use either "while in touch" or "is touching" commands.

Hope this helps :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Feb 14, 2012 9:36 am

@Kyatric Thanks 4 ur help.
I tried to use the is touching object 4 the right and left directions and it works fine.
For the top direction i just left it as it is "on touch object" but i want it to work as it is in the game now; ie:
if he is standing and jump the strength of the jump will be different from the case of he is running and jump. and in both cases there is two jumps one if he is in the floor and the other if he is on the sky.

Thanks again and wish u a nice day :)
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 21 guests