Best way to handle scene-changing cutscenes?

Started by Jared, Sun 09/08/2009 04:10:53

Previous topic - Next topic

Jared

Working on some fairly lengthy in-game cutscenes at the moment and I've been having a bit of trouble - first I was thinking that covering it in a global script would make the most sense, but then I remembered all the object animations that would need to be set and called within the room and dropped that idea. What I'm currently doing is using the AfterFadeIn() function of the rooms to script the action of the cutscene, which goes between 3 different rooms.  It looks a little like this:


RoomZAfterFadeIn(){

If(cEgo.PreviousRoom==x){
  if(cutsceneState==1){
     //dialogue
     cEgo.ChangeRoom(y);
     }
  }

}

This causes problems, and in hindsight I can see why, to do with the new room code still running. So then I figured the best way would be to use a placeholder to store the change room number and call the changeRoom function at the end of the afterFadeIn() function, but due to the odd error messages I was getting I'm getting the feeling that passing a value into changeRoom() that way isn't meant to be done.

(I tried this both with a global and a local int as a placeholder - in both cases the game crashed telling me that I was missing 'Intro.crm', which is a file I don't have nor have ever used - I filed that under 'weird')


I get the distinct feeling I'm missing a trick here and making things too complicated.. surely there are easier ways to do these cutscenes given how many people use? I was thinking then of calling individual functions for each scene of the cutscene within the room script, but I'm not sure if that would work..

Khris

AGS looking for Intro.crm hints at you calling cEgo.ChangeRoom(0);

The way to go about having cutscenes spanning multiple rooms is exactly what you're trying; I suspect you screwed up when you created the global variables and ChangeRoom gets called with 0.
What exactly were the odd error messages?

Could you show an example of the actual code you've used? How did you create the global variables?
I don't think you even need them, except cutsceneState.

SMF spam blocked by CleanTalk