Simple Q - how to move along x

Get help using Construct 2

Post » Fri Oct 14, 2011 11:13 am

Hi there

Since multitouch isnt supported right now
I am wonder how its best to make a sprite
slide left and right along X axis

http://pauk.dk/froggy/froggy.jpg

Cheers
B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Fri Oct 14, 2011 12:03 pm

HI so I found this

*Mouse: Left button is down -> set X to Sprite.X+5
or
*Mouse: Left button is down -> set X to Sprite.X+50*dt

BUT how do I use this on my btn-triggers
B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Fri Oct 14, 2011 12:49 pm

Multitouch is supported, with two caveats:
1) The Touch.X and Touch.Y expressions only return one value, so only can ever return one touch
2) Android's browser doesn't properly support multitouch, but it should be fixed this month with the 'Ice Cream Sandwich' (Android 4) update. iOS should work fine though.

If you use sprites on-screen as touch buttons, then use the 'is touching object' or 'on object touched' events, multitouch should work fine (once Android 4 is out).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Oct 14, 2011 1:41 pm

Super.. Thanks

I did find out how to use your 2. solution

Sample here

BUT how do I use the Touch.X expression

regards

B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Fri Oct 14, 2011 10:49 pm

Ive done this for scrolling background

player.X+100*dt ... moves right
BG.X-50*dt       ... background moves left

BUT how do I stop the background when player
bounds the layout

LOVE C2    
B
23
S
12
G
10
Posts: 323
Reputation: 7,382


Return to How do I....?

Who is online

Users browsing this forum: h1k3, LeFuji and 20 guests