Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Cogliostro on Tue 26/02/2013 21:25:21

Title: SpeechAnimationDelay troubles
Post by: Cogliostro on Tue 26/02/2013 21:25:21
Okay, doing a lot of my own GUI's for my third game.  It's been quite the learning experience, but now I have a problem.  When a saved game is restored, all of the SpeechAnimationDelay values drop to ZERO. 

I did a work around, and added this code to the GLOBALSCRIPT.ASC

Code (AGS) Select
function on_event(EventType event, int data){
  if(event==eEventEnterRoomBeforeFadein) {
    // RESTORED games upset the speech animation #  -- Trying to fix
    int x=0;
    while (x<6) {
      character[x].SpeechAnimationDelay=4;
      x++;
    }
  }
}


Have I come up with the best option?  Is there a fix?  Is there a more elegant solution?

- Cogliostro
Title: Re: SpeechAnimationDelay troubles
Post by: Khris on Wed 27/02/2013 16:19:06
Looks like a bug, and your solution is almost exactly what I would do, except that I'd use eEventRestoreGame, not eEventEnterRoomBeforeFadein.
Title: Re: SpeechAnimationDelay troubles
Post by: Crimson Wizard on Wed 27/02/2013 20:07:37
This property is restored normally in a quick test game I made. There might be a particular reason for such bug to happen?

Do you use any plugins, or modules (other than your own)?
Title: Re: SpeechAnimationDelay troubles
Post by: Cogliostro on Mon 04/03/2013 01:50:13
Crimson Wizard -
The only one I'm using the the Dynamic Sprite Rotation and - if this is causing the trouble - I'll eliminate the module.  It's only being used in a "READ ME" room.

Khris -
That's the perfect fix.  Thanks.

- Cogliostro