touch object resetting to 0,0 when not in touch

Get help using Construct 2

Post » Tue Oct 23, 2012 7:27 pm

have some basic touch controls on my game but every time the touch is released the character goes to the top right corner. Any one have any idea why ? Im sure its pretty straight forward, but ive tried save x and y to variables and loading them everytime the object isnt in touch, that doesnt work.

https://dl.dropbox.com/u/84483952/thunderforce%20zero%20%281%29.capx

all the info is in event sheet 1railslave2012-10-23 19:27:46
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Oct 23, 2012 9:45 pm

Well, you're setting the character to Touch.X, Touch.Y every tick and when you're not touching they'll both be 0. So only set the player's position when in touch.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Oct 23, 2012 9:58 pm

Hey thanks, so straightforward as usual :P thanksyou , major hurdle cleared
B
16
S
4
G
4
Posts: 179
Reputation: 4,688


Return to How do I....?

Who is online

Users browsing this forum: emoticon, makkancs and 23 guests