SpeechAnimationDelay troubles

Started by Cogliostro, Tue 26/02/2013 21:25:21

Previous topic - Next topic

Cogliostro

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
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
"First things first, but not necessarily in that order." - Dr. Who

Khris

Looks like a bug, and your solution is almost exactly what I would do, except that I'd use eEventRestoreGame, not eEventEnterRoomBeforeFadein.

Crimson Wizard

#2
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)?

Cogliostro

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
"First things first, but not necessarily in that order." - Dr. Who

SMF spam blocked by CleanTalk