Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: rmonic79 on Tue 05/11/2019 11:44:40

Title: Diagonal loops only when characters change drections. [SOLVED]
Post by: rmonic79 on Tue 05/11/2019 11:44:40
hi guys. I need to have diagonal loops only when the characters change directions but not on talk or walk animations. I've not tried to code it yet but i thaught about a lot of small problems that can occurs. Is there anyone that just did it and like to share it?
Title: Re: Diagonal loops only when characters change drections.
Post by: Cassiebsg on Tue 05/11/2019 14:30:21
Wait, what exactly do you mean "change directions" but not walk animation?

Talk is easy, you just fill in the 4 first loops, and eventually either fill the last 4 with copies of the first 4 (so you decide which direction it will be showed. Or you can just write a piece of code to determine which loop you want to show.

Like: if (player.Loop==7) player.Loop=3;

I guess you can do the same for walk, or just use 4 loop views, and code the diagonals instead.
Title: Re: Diagonal loops only when characters change drections.
Post by: rmonic79 on Tue 05/11/2019 14:47:21
What i mean is that turn before walking, speech, stand and idle must have diagonal loops, not walk animations.
Title: Re: Diagonal loops only when characters change drections.
Post by: Alan v.Drake on Tue 05/11/2019 15:07:22
If you only add the first frame for the diagonal loops, you should get the result you're looking for.
At worst you may need to add a function to make sure the character is facing one of the 4 main directions, if by some accident you have it facing diagonally and you need to start talking animations.


- Alan
Title: Re: Diagonal loops only when characters change drections.
Post by: rmonic79 on Tue 05/11/2019 15:10:12
I'm starting try it now, i've just have some ideas of how to do it, but every suggestions is welcome. what i fear is that beetwen the transition it could be glitches. I'll let you now.
Title: Re: Diagonal loops only when characters change drections.
Post by: rmonic79 on Tue 05/11/2019 16:04:38
Guys i discovered a funny things that didn't read before. If you add only one frame to Dr Dl etc.... in view he doesn't get the diagonal loops by default, Great. If only one of diagonal loops in normal view have more than one frame it starts to get diagonal loop on walking. Solved without stress  :-D :-D :-D