How do I follow touch

Get help using Construct 2

Post » Sun Sep 14, 2014 12:52 pm

I know how to make my object follow my mouse, but how do I make it follow the touch??


I am making one of those games, bouncing fireballs and floating bar that follows the mouse/touch.

The game is fine follow the mouse, but I could not get it follow the touch. How exactly to do that? set X = Touch.X??
On touching end, set X = Touch.x??

and for some reason, the touch method i used, the bar is way off where touch's at, why is that?
eg.

if my bar is right here ___________ my finger will be here.


any useful tips are welcome.
B
3
Posts: 11
Reputation: 197

Post » Sun Sep 14, 2014 1:01 pm

Check the image points of the bar. Make sure the origin image point is in the right place, often if you resize images it will have moved.

For following touch the 'For every tick : set X = Touch.X & set Y = Touch.Y' should work fine, you should not need to have anything trigger on touch end unless you want something else to happen when you release the touch.
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
6
Posts: 52
Reputation: 3,006

Post » Sun Sep 14, 2014 1:33 pm

Check out the 'Vertical space shooter' template in the example projects. When you create a new project, you can find them below the various empty project setups.
It might not be exactly what you're looking for as is, but if you take out the Y axis it could be just that. :)
B
84
S
20
G
6
Posts: 175
Reputation: 8,156

Post » Mon Sep 15, 2014 4:51 am

Thanks, I will try later, and let you guys know how it goes.
B
3
Posts: 11
Reputation: 197


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests