Me Dumb You Smrt

Get help using Construct 2

Post » Wed Jan 11, 2012 1:48 am

Can anyone start me off on some Ideas of how to make a "Touch" slider. ie. If the player runs their finger across the screen from left to right or VV. the background scrolls and advances forward. Somewhat like those ipad childrens apps from Disney.

Strange I know for games. Though could be sweeeet. Thanks! Construct 2 is amazing.
"Enter The Grump Monk"
B
12
S
4
G
5
Posts: 40
Reputation: 3,934

Post » Wed Jan 11, 2012 1:48 am

that VV is vice versa. haha
"Enter The Grump Monk"
B
12
S
4
G
5
Posts: 40
Reputation: 3,934

Post » Wed Jan 11, 2012 9:10 am

- on touch you store the touch.X in a 'startX' variable
- while you have your finger on the screen you calculate the offset like touch.X-startX
- then you scroll the display by this amount

I did that to mimic a panning by middle clicking+drag.
It's the exact same idea.
Panning.capx
Last edited by Yann on Sun Sep 14, 2014 10:14 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 11, 2012 1:42 pm

Ah this is helpful. I owe you cookies! Thanks.
"Enter The Grump Monk"
B
12
S
4
G
5
Posts: 40
Reputation: 3,934

Post » Wed Jan 11, 2012 4:59 pm

This is what i did with it. Thanks! Helped out perfectly. Wanted to restrict it to the X too

http://www.knowfollowers.ca/

Click the link, see what ive done.
"Enter The Grump Monk"
B
12
S
4
G
5
Posts: 40
Reputation: 3,934

Post » Wed Jan 11, 2012 6:35 pm

oh! right click ok

nice (:... maybe the moon should go behind the text 'cause it's pretty close in values and it blends a bit too much with the title. So either way from the center, either a bit darker (:
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 11, 2012 7:16 pm

cant seem to keep the title centred on all devices but meh, thanks for the help! The moon is now out of the way haha
"Enter The Grump Monk"
B
12
S
4
G
5
Posts: 40
Reputation: 3,934

Post » Wed May 09, 2012 6:43 pm

Lovely ! But how do I turn it to work on touch device ?
B
21
S
9
G
4
Posts: 197
Reputation: 4,105

Post » Wed May 09, 2012 8:02 pm

@Laurent
Just change the click references by touch references.
I already turned it for touch, but i'm not on my computer right now.
I'll upload it tomorrow if you don't figure it out.septeven2012-05-09 20:03:20
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed May 09, 2012 8:07 pm

That would be great, Septeven. I tried to but didnt manage to deal with the variables.
B
21
S
9
G
4
Posts: 197
Reputation: 4,105

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, TELLES0808 and 23 guests