Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: rmonic79 on Sat 06/12/2014 15:57:32

Title: Help about frame number when view change
Post by: rmonic79 on Sat 06/12/2014 15:57:32
hi guys i have a little problem, i have a continuos idle view and a talk view that have the same movement as idle plus speech, is there a way to have the same frame number on view change like seems that the character talks without stop doing his stuff?
Title: Re: Help about frame number when view change
Post by: abstauber on Sun 07/12/2014 08:50:17
Have you tried this?

Code (ags) Select

player.ChangeView(THEVIEW);
player.loop = 2;
player.frame = 4;


But I'm not sure if the loop is reset to 0 if you change the view. So if that happens, you need to save the frame first:
Code (ags) Select

int temp_frame = player.frame;
player.ChangeView(THEVIEW);
player.frame = temp_frame;
Title: Re: Help about frame number when view change
Post by: rmonic79 on Mon 08/12/2014 14:03:24
Quote from: abstauber on Sun 07/12/2014 08:50:17
Have you tried this?

Code (ags) Select

player.ChangeView(THEVIEW);
player.loop = 2;
player.frame = 4;


But I'm not sure if the loop is reset to 0 if you change the view. So if that happens, you need to save the frame first:
Code (ags) Select

int temp_frame = player.frame;
player.ChangeView(THEVIEW);
player.frame = temp_frame;


i don't understand entirely the answer :( where i have to put this code? i've tried in room_RepExec() like this
Code (ags) Select
int temp;
function room_RepExec()
{temp=cMelvin.Frame;
  if (cMelvin.SpeechView==50){cMelvin.Frame=temp;}//50 is the thespeechview
 
}

but doesn't work :(
Title: Re: Help about frame number when view change
Post by: abstauber on Tue 09/12/2014 09:20:41
sorry, it seems like I misunderstood what you wanted.
I don't think it's possible to change the frame, once AGS automatically changes the view. But I'm not 100% sure.

A way I can think of is to use two characters as one. One "character" is the body and the other "character" only shows the head and follows the body-character exactly.
Title: Re: Help about frame number when view change
Post by: rmonic79 on Tue 09/12/2014 12:34:04
Quote from: abstauber on Tue 09/12/2014 09:20:41
sorry, it seems like I misunderstood what you wanted.
I don't think it's possible to change the frame, once AGS automatically changes the view. But I'm not 100% sure.

A way I can think of is to use two characters as one. One "character" is the body and the other "character" only shows the head and follows the body-character exactly.
i'll give it a try, thanks
Title: Re: Help about frame number when view change
Post by: Cassiebsg on Tue 09/12/2014 18:27:08
Oh... I can already see the potential for this one! The Body hits a wall and the head continues it's journey... (laugh)