Touch Screen Sprite

Get help using Construct 2

Post » Wed Dec 07, 2011 1:59 pm

Hi Guys

Please see CAPX as I am stumped as to why the sprite is in the middle of the view in Construct but, when testing the sprite sits in the bottom left corner.

does this have something to do with the fact that Touch controls are being used and the sprite needs to be in a fixed position at start of layout.

I have tried fixing the postion but it had no effect.

Any help would be hugely appreciated
B
4
G
2
Posts: 30
Reputation: 1,260

Post » Wed Dec 07, 2011 8:58 pm

Because indeed of the blank event that gets executed every tick (since it's blank), setting the position of your sprite to touch.X.

Apparently, when not touching the screen, touch.X = 0.
Since there is no condition, your action set position to touch.x is executed every tick.

I guess adding a Touch."is in touch" condition should fix this.
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,791

Post » Thu Dec 08, 2011 9:38 am

it has worked, thanks for that, I was pulling my hair out
B
4
G
2
Posts: 30
Reputation: 1,260

Post » Thu Dec 08, 2011 9:46 am

Relevant article from the manual.
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,791


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, mystazsea and 18 guests