How do I Make this movement look more seamless

Get help using Construct 2

Post » Fri Jul 17, 2015 8:10 am

I have path finding on to allow for the player to avoid obstacles. But when the character was near the target location he would stop, and or sometimes overshoot.

I added in a set X and Y line to make him center on the square, the problem is it still looks like he teleports. Even more so if pathfinder overshoots. Can someone adjust this and make it more seamless?

https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0

Also note I've been looking into adding a custom movement when the player is in a certain range as an option, so far I've not been able to make this work without error. With this idea I was thinking if player is within 30 pixels of target shut off pathfinding, and move towards target until player's location = X and Y.

Thanks!
B
8
Posts: 23
Reputation: 360

Post » Fri Jul 17, 2015 8:39 pm

Please save it using a non-beta version of Construct (like v r206?)

I don't get people's fascination with beta-level development products. You don't need to tempt fate when it comes to bugs, you create enough for yourself...
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Fri Jul 17, 2015 11:06 pm

action "set X" or "set Y" teleport your sprite on position(X,Y)..
you can try something like this:

add a boolean variable to your sprite
when sprite X or sprite Y not egal to tarx or tary
set boolean to true

add condition when boolean is true: move sprite to tarx,tary (or use custom movement... as you want)
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, shawnzien, tatogame and 7 guests