Author Topic: Calling animations while idle is playing  (Read 1916 times)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Calling animations while idle is playing
« on: 24 Oct 2017, 18:40 »
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

Alan v.Drake

  • ...
    • Alan v.Drake worked on one or more games that won an AGS Award!
    •  
    • Alan v.Drake worked on one or more games that was nominated for an AGS Award!
Re: Calling animations while idle is playing
« Reply #1 on: 24 Oct 2017, 19:34 »
I thought I had fixed this, are you using the latest version ?

- Alan

Re: Calling animations while idle is playing
« Reply #2 on: 25 Oct 2017, 10:06 »
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.
« Last Edit: 25 Oct 2017, 10:08 by Crimson Wizard »

Alan v.Drake

  • ...
    • Alan v.Drake worked on one or more games that won an AGS Award!
    •  
    • Alan v.Drake worked on one or more games that was nominated for an AGS Award!
Re: Calling animations while idle is playing
« Reply #3 on: 25 Oct 2017, 10:33 »
It was allegedly fixed with pull request #361, merged with commit f873b10 around last September.

- Alan

Re: Calling animations while idle is playing
« Reply #4 on: 25 Oct 2017, 10:37 »
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.

Alan v.Drake

  • ...
    • Alan v.Drake worked on one or more games that won an AGS Award!
    •  
    • Alan v.Drake worked on one or more games that was nominated for an AGS Award!
Re: Calling animations while idle is playing
« Reply #5 on: 25 Oct 2017, 10:58 »
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

Re: Calling animations while idle is playing
« Reply #6 on: 25 Oct 2017, 13:46 »
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.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: Calling animations while idle is playing
« Reply #7 on: 25 Oct 2017, 15:05 »
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.

Slasher

  • Slasher....Truth hunter...
    • I can help with AGS tutoring
    • Lifetime Achievement Award Winner
    • I can help with scripting
    • I can help with story design
    • Slasher worked on one or more games that won an AGS Award!
    •  
    • Slasher worked on one or more games that was nominated for an AGS Award!
Re: Calling animations while idle is playing
« Reply #8 on: 25 Oct 2017, 18:28 »
Have you tried Khris' IdleIdle module?

if it is relevant..