Adventure Game Studio

AGS Development => Engine Development => Topic started by: Dave Gilbert on Tue 24/10/2017 18:40:46

Title: Calling animations while idle is playing
Post by: Dave Gilbert on Tue 24/10/2017 18:40:46
Hopefully I am posting this in the correct place! This is one of those AGS-isms that has been bothering me for a very long time, but never thought to make a feature request until now.

Currently, when an idle animation is playing for a character, AGS treats the idle view as its CURRENT VIEW. So if you try and call an animation loop while the idle animation is playing, the game will crash with a "loop not found" error.

Here's an example of how it currently works:
Character "Eli" has a main view called vEliAnims, which contains his walk cycle and his various animations. He has a jump animation at loop 23.
Eli's idle animation view is called vEliIdle.
If I want Eli to jump and his idle animation is playing at the time, AGS will look for loop 23 in vEliIdle instead of vEliAnims. The game will crash.

I know there are ways to get around this problem (like passing an idle of -1 before any animations are played) but they are fiddly and easy to forget. Ideally, AGS would look for his loop in his default view, not his idle view.

Thanks! If I posted this in the wrong spot, feel free to move it.

-Dave
Title: Re: Calling animations while idle is playing
Post by: Alan v.Drake on Tue 24/10/2017 19:34:14
I thought I had fixed this, are you using the latest version ?

- Alan
Title: Re: Calling animations while idle is playing
Post by: Crimson Wizard on Wed 25/10/2017 10:06:42
Quote from: Alan v.Drake on Tue 24/10/2017 19:34:14
I thought I had fixed this, are you using the latest version ?

Where was this fixed? I do not see reference to similar problem in Changes.txt.
Title: Re: Calling animations while idle is playing
Post by: Alan v.Drake on Wed 25/10/2017 10:33:29
It was allegedly fixed with pull request #361, merged with commit f873b10 around last September.

- Alan
Title: Re: Calling animations while idle is playing
Post by: Crimson Wizard on Wed 25/10/2017 10:37:56
Quote from: Alan v.Drake on Wed 25/10/2017 10:33:29
It was allegedly fixed with pull request #361, merged with commit f873b10 around last September.

Ah, looks like I missed this commit when writing changelog.

But this commit fixes only case with ChangeView? Maybe Animate has a problem with different part of the code.
Title: Re: Calling animations while idle is playing
Post by: Alan v.Drake on Wed 25/10/2017 10:58:53
Hmmm, Animate looked like it already had the necessary checks. It was the change view not doing its work, at least in my test case.
I'd like to know if Dave is using a version that had yet to receive this fix.

- Alan
Title: Re: Calling animations while idle is playing
Post by: Crimson Wizard on Wed 25/10/2017 13:46:21
Yes, Dave, please state the exact version, and also the script command(s) that is causing the crash, just to be sure we are talking about same thing.
Title: Re: Calling animations while idle is playing
Post by: Dave Gilbert on Wed 25/10/2017 15:05:38
Ah. If it was last September then maybe I just missed it! I am trying to reproduce it and can't seem to.

I guess it's true what they say about "assume!" Apologies. Feel free to lock/remove/destroy this thread.
Title: Re: Calling animations while idle is playing
Post by: Slasher on Wed 25/10/2017 18:28:35
Have you tried Khris' IdleIdle module?

if it is relevant..