Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Cookie_Wood on Mon 19/08/2019 08:15:23

Title: How to make my player walking view to not start over on each walk process click?
Post by: Cookie_Wood on Mon 19/08/2019 08:15:23
Hi everyone :)

I'm really sorry if this topic already exists, if a tutorial explains how to do this, or if it's an AGS limit, I swear I searched a lot before posting, but : I'd like my player character walking loop to not start over on each walk processclick (if the loop is not finished).
My Backgrounds are sometimes very large (too large I guess) and crossing it from right to left can be unpleasing because the walking loop starting over before it's end cause a slight "shaking effect" on the backgrounds.

Does someone has a solution to get the player character keep on finishing it's walking loop even if the (human) player process several walk click ?

I hope I made myself clear :/
Thanks :D
Title: Re: How to make my player walking view to not start over on each walk process click?
Post by: Khris on Mon 19/08/2019 14:31:34
I don't think this is possible without completely replacing AGS's built-in pathfinding and walking, however the problem you describe sounds like it isn't caused by the walk-cycle starting over but merely by the way how AGS calculates the viewport of a scrolling room based on the player's position. In other words, if you use something like Ali's smooth scrolling module (https://www.adventuregamestudio.co.uk/forums/index.php?topic=33142.0), the jittery scrolling will no longer happen, independent of what the walkcycle does.

Apologies if this *is* caused by the walk-cycle though.
Title: Re: How to make my player walking view to not start over on each walk process click?
Post by: eri0o on Mon 19/08/2019 15:01:40
Erh, Khris, can you explain how this would be solvable by implementing a new pathfinding? I can't understand how this is related (I may be doing just that...).
Title: Re: How to make my player walking view to not start over on each walk process click?
Post by: Cookie_Wood on Mon 19/08/2019 16:32:48
I just set this module, you were right Khris, that completly corrected my problem !

Thank you so much Khris and Ali !

Do not apologies, AGS is such an awesome soft and you're always so kind :)

Thanks again :D
Title: Re: How to make my player walking view to not start over on each walk process click?
Post by: Snarky on Mon 19/08/2019 16:57:51
Quote from: eri0o on Mon 19/08/2019 15:01:40
Erh, Khris, can you explain how this would be solvable by implementing a new pathfinding? I can't understand how this is related (I may be doing just that...).

If I take Khris's meaning correctly, it's not that the solution has anything to do with pathfinding, it's that it can't be solved with AGS's built-in walking system, since there's (allegedly) no way to control the animation while somebody's walking: it's governed by AGS. You would therefore have to reimplement the whole walking logic, complete with pathfinding, in order to change this behavior.

I'm not sure this is actually true, though. First of all, does the walking animation actually reset from frame 1 if you override an in-progress walk with a new destination? And second, it seems to me that even if it does, you could control the animation yourself (advancing frames manually) while relying on the AGS pathfinding, using an invisible dummy character if necessary.
Title: Re: How to make my player walking view to not start over on each walk process click?
Post by: Khris on Mon 19/08/2019 18:20:29
Yes, that was what I meant.

Also yes, it can work with a dummy character, somehow I keep forgetting this although I've used and suggested this solution lots of times ;)