Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Dave Gilbert on Mon 10/07/2006 15:24:10

Title: Talking portraits won't reset after restore
Post by: Dave Gilbert on Mon 10/07/2006 15:24:10
Hi all,

There's a weird bug in "Shivah" that has me stumped.  Upon reloading a saved game, the talking portraits do not reset back to where they are supposed to be.  For example, if you save before a character is "happy", then the character becomes "angry", and then you restore, the character portrait remains "angry". 

I am flummoxed by this.  Any suggestions would be helpful.

-Dave
Title: Re: Talking portraits won't reset after restore
Post by: Rui 'Trovatore' Pires on Mon 10/07/2006 15:41:48
I did once before encounter a similar bug, dunno if this is any help - in an old project, after "restarting" (which is basically restoring saved game 999) I found some objects' views did not reset to their original setting. I changed their views quite often during the course of the game, I disremember whether I had changed them or temporarily set/locked them (I think I changed them), but whichever the case this has led to some odd situations like "Illegal frame number on specified loop", or something of the sort.

I didn't report it because it was easy enough, in the context, to add a couple of lines in the "enters toom before fadein" spot, and I just thought "I guess I just did something wrong."
Title: Re: Talking portraits won't reset after restore
Post by: Pumaman on Mon 10/07/2006 19:41:15
How are you doing "angry" vs "happy"? Is it a different speech view?
Title: Re: Talking portraits won't reset after restore
Post by: Dave Gilbert on Mon 10/07/2006 19:49:29
Hi CJ,

Good question.  I have one "default" talking view, and for each change of emotion I wrote a function that changes the sprites for each frame of the view. 
Title: Re: Talking portraits won't reset after restore
Post by: Pumaman on Mon 10/07/2006 20:53:20
Which version are you using? I think it was 2.72 beta 5 or thereabouts that functionality was added to preserve changed view frames in the save games
Title: Re: Talking portraits won't reset after restore
Post by: Dave Gilbert on Sat 12/08/2006 04:17:16
Hm, ok I think I might have something that will shed some light on this problem.

WHen I change the expressions for the talking portraits, I do a "ViewFrame *frame = Game.SetViewFrame(x,x)" command.  Could this be what is causing the problem? And is there anyway around it?
Title: Re: Talking portraits won't reset after restore
Post by: strazer on Sat 12/08/2006 10:34:30
You mean
  ViewFrame *frame = Game.GetViewFrame(x,x)
? This function takes three parameters, btw.

Anyway, please answer CJ's question:
Quote from: Pumaman on Mon 10/07/2006 20:53:20
Which version are you using? I think it was 2.72 beta 5 or thereabouts that functionality was added to preserve changed view frames in the save games
Title: Re: Talking portraits won't reset after restore
Post by: Dave Gilbert on Sat 12/08/2006 13:42:06
Hm.  I'm using the latest and greatest version.  It still doesn't solve the problem.
Title: Re: Talking portraits won't reset after restore
Post by: strazer on Sat 09/09/2006 16:39:23
*Bump*

Dave, if you haven't been able to solve the problem, care to send CJ your game's source so he can investigate the problem?
Title: Re: Talking portraits won't reset after restore
Post by: Dave Gilbert on Sat 09/09/2006 17:24:22
mm, the game is quite large, but I think I can knock up a small example of the problem.  Thanks, Straze.
Title: Re: Talking portraits won't reset after restore
Post by: strazer on Thu 14/12/2006 12:49:09
Dave or CJ, has this been resolved?