Help about frame number when view change

Started by rmonic79, Sat 06/12/2014 15:57:32

Previous topic - Next topic

rmonic79

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?

abstauber

Have you tried this?

Code: ags

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

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

rmonic79

Quote from: abstauber on Sun 07/12/2014 08:50:17
Have you tried this?

Code: ags

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

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
int temp;
function room_RepExec()
{temp=cMelvin.Frame;
  if (cMelvin.SpeechView==50){cMelvin.Frame=temp;}//50 is the thespeechview
  
}

but doesn't work :(

abstauber

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.

rmonic79

#4
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

Cassiebsg

Oh... I can already see the potential for this one! The Body hits a wall and the head continues it's journey... (laugh)
There are those who believe that life here began out there...

SMF spam blocked by CleanTalk