How to move player the same way touch i moving?

Get help using Construct 2

Post » Thu Feb 12, 2015 8:09 pm

Hey guys
Can someone help me to figure out to replicate the movement in this capx

https://dl.dropboxusercontent.com/u/167 ... _does.capx

Without using the drag and drop behavior.
It works fine as it is, but when i hold the position it keeps going forward in a jagged way instead of staying still :-(

how can i do the same with the touch object?

Hope you can help me :-)
B
4
S
1
Posts: 23
Reputation: 951

Post » Fri Feb 13, 2015 12:22 am

Do you want the player move to the touch position ?

Touch - on any touch start ------------- player move to x (touch.x), y (touch.y)
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Fri Feb 13, 2015 5:44 am

Thanks for the quick reply @A0Nasser
No. i want the player to move like it does now.
But without using the drag and drop behavior.
Insted i want to create the same control with the touch object,
because the drag and drop is not precise whe holding a position.

When i test my game on mobile its perfect because no matter
where i touch on the screen, i can control the players movement
Like in the game R-type or Phoenix HD.

But i founded out that when holdind still, people holds the finger on the screen and because
i am scrolling forward the drag and drop behavior doesnt work that well.
It wants to keep going forward i a jagged way.

Thats why I wan to replicate the behavior in the capx without using the drag and drop behavior.
Moving the player object in the same direction touch is moving and at the same speed touch is moving,
without moving to the touch x & y position.

I hope it makes sense
Thanks again :)
B
4
S
1
Posts: 23
Reputation: 951

Post » Fri Feb 13, 2015 9:59 pm

Hey guys

I found a behavior called rex_touchDirection2 that works perfectly :D
Thank you @rexrainbow for making this behavior.
B
4
S
1
Posts: 23
Reputation: 951

Post » Sat Feb 14, 2015 12:11 am

@Escualo

It also could move to reverse way by set "Proportion" to -1 in properties table.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Sat Feb 14, 2015 11:29 am

Thanks @rexrainbow :D
B
4
S
1
Posts: 23
Reputation: 951

Post » Sat Feb 14, 2015 11:39 am

yes Rex plugins works fine
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753


Return to How do I....?

Who is online

Users browsing this forum: Blendi1223 and 45 guests