Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Dervish on Sat 20/10/2007 01:50:59

Title: Cutscene across multiple rooms
Post by: Dervish on Sat 20/10/2007 01:50:59
In order to do a cutscene where the character exits the one room and goes into another and the cutscene continues I obviouly cannot do that in the room script. Is there an easy way to continue a cutscene into another room?

Thanks
Title: Re: Cutscene across multiple rooms
Post by: Creator on Sat 20/10/2007 02:07:53
If it's the first time the player is entering the new room (where the cutscene continues) you can use the 'First Time Player Enters Room' command, but if you have already entered that room you could use a variable, GlobalInt or if there is a character in the room which is only there for that cutscene you could use

if (cCharacter.Room == player.Room) {
  //play cutscene
}

in the 'Player Enters Room After Fade In'.
Title: Re: Cutscene across multiple rooms
Post by: Akatosh on Sat 20/10/2007 15:08:01
Or, if the character comes from a cutscene-only room, you can check for the value of player.PreviousRoom. It depends on the situation, really.
Title: Re: Cutscene across multiple rooms
Post by: Radiant on Sat 20/10/2007 15:09:02
Yes.

There's this variable called game.is_cutscene_playing (or something like that) which indicates whether or not you're actually in a cutscene.

Alternatively, use global variables:
at the start of your cutscene, go SetGlobalInt (1, 1);
in the new room, check if (GetGlobalInt (1) == 1) then continue.
And at the end of the cutscene, SetGlobalInt (1, 0).