How do I set a follow touch behavior?

Get help using Construct 2

Post » Thu May 15, 2014 9:48 pm

Hey guys...

I want to add a behavior to my character, so it follows the "finger", meaning that, on a touch device, if I click on the character and I move my finger on the screen, the character will be under my finger all the time...

What should I use? (something like this?)

Touch >>> On touched Character // Character >>> Set Position to (Touch.X, Touch.Y)

Thanks!!!
B
4
Posts: 12
Reputation: 224

Post » Thu May 15, 2014 10:01 pm

Check the wonderful MoveTo plugin https://github.com/rexrainbow/C2_plugin ... rex_moveto
It will do it
B
15
S
4
Posts: 57
Reputation: 1,792

Post » Thu May 15, 2014 10:49 pm

Hmmm... What should I do with it? (sorry, still investigating the whole program)
B
4
Posts: 12
Reputation: 224

Post » Fri May 16, 2014 4:47 am

This is a plugin (check the manual to learn how to add plugins) which allow to do what you want.

It will add the behavior MoveTo. It has to be with the Platform behavior.
Everything will be clear after that ;)
B
15
S
4
Posts: 57
Reputation: 1,792

Post » Wed May 28, 2014 4:24 pm

I´ll try it out. Thanks!
B
4
Posts: 12
Reputation: 224

Post » Wed May 28, 2014 5:22 pm

Also one of the demos shows hiw to do this. I tjink its the vertical space shooter demo.
It basically sets player x and y to touch x and y.
B
10
S
2
G
1
Posts: 42
Reputation: 798


Return to How do I....?

Who is online

Users browsing this forum: stevenode and 9 guests