How do I animating Pathfinding

Get help using Construct 2

Post » Thu Nov 05, 2015 4:12 pm

Hello guys!
I wonder how I can animate a "sprite Pathfinding".
Ie would like to know how dumb the animation according to the movement of the sprite with Pathfinding.
When climbing the sprite display an animation up, down and down an animation etc.
Someone has to send me a link or caps?
I am looking for this for some time, I gave up and now I'm looking for one progeto I'm creating!
Thanks in advance!
====================================
Olá pessoal!
Gostaria de saber como eu posso animar um "sprite Pathfinding".
Ou seja gostaria de saber como mudo a animação de acordo com o movimento do sprite com Pathfinding.
Quando subir o sprite mostrar uma animação subindo, descer uma animação descendo e etc.
Alguem tem como me mandar um link ou um caps?
estou procurando isso a algum tempo, desisti e agora estou querendo pra um progeto que estou criando!
Des de já, obrigado!
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853

Post » Thu Nov 05, 2015 4:29 pm

You can get the angle of movement with the expression sprite.pathfinding.movingangle and base your animations on that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 05, 2015 6:05 pm

B
29
S
9
G
3
Posts: 280
Reputation: 4,187

Post » Thu Nov 05, 2015 6:10 pm



Are you sure you have linked the right capx?
This one has nothing to do with pathfinding and/or animations..

Besides that it's very inefficient, for it can be done with two actions:

https://dl.dropboxusercontent.com/u/485 ... angle.capx
Last edited by LittleStain on Thu Nov 05, 2015 6:15 pm, edited 1 time in total.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 05, 2015 6:10 pm

You need to build a state machiene : https://www.scirra.com/tutorials/1139/h ... e-machines

Then you can add conditions to change the states like LittleStain is suggesting.

If you dont, then at some points your character will be trying to do more than 1 thing at a time, and it will make the animations stop completely.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Thu Nov 05, 2015 9:35 pm

Tks, tks, tks!
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853

Post » Fri Nov 06, 2015 12:52 pm

I was excited, but in the end came to nothing. = (
I'm using Pathfinding to the enemy that created randomly walk around the map and see the player he follows Your Way!
Until then I found tutorials that were great and it's all working fine!
now I want to animate this sprite, ok I do the animation smoothly, but it does not follow the same direction as the sprite moves!
I do not know about implementing a trigger or something for when the enemy go up the animation show he's back up and down the animation show it facing down.
I tried to install the most error plugin and it does not work and not to bring up the capx.
I would like to do this without putting a plugin? I tried using 8 directions with the Pathfinding over the sprite that makes the animation also does not change angle or even using X and Y.
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853

Post » Fri Nov 06, 2015 1:28 pm

Quickly put together, just for explaining purposes:

https://dl.dropboxusercontent.com/u/485 ... angle.capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Nov 06, 2015 4:18 pm

LittleStain, thank you wrong so even if I was wanting! I am very happy!!!!!
Thank you all for your help!
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853


Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 13 guests