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?

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

any useful tips are welcome.
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 :

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

I also write for, 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 !
Posts: 52
Reputation: 3,156

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. :)
Posts: 175
Reputation: 8,181

Post » Mon Sep 15, 2014 4:51 am

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

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests