Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Afflict on Sun 23/04/2006 02:34:45

Title: Cutscene help.
Post by: Afflict on Sun 23/04/2006 02:34:45
I am having a majour difficulty making a certain cutscene.

The cutscene starts out in one room and moves over to a next room. Ie character opens door and enters a diferent room. Then plays out some actions. How do I do this transision ???

Any help with making cutscenes will be appreciated!

Thanks

Afflict.
Title: Re: Cutscene help.
Post by: Ishmael on Sun 23/04/2006 02:48:44
Just start with StartCutscene, script in the stuff you want to happen, and place EndCutscene where you want the game to jump if the cutscene is skipped (refer to the StartCutscene manual entry for info realted to this).

There shouldn't be anything unusual with the room change...
Title: Re: Cutscene help.
Post by: Ashen on Sun 23/04/2006 12:52:07
I think there has been some oddness with cutscenes including ChangeRoom commands (see here, for example (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=24842.0)). As mentioned in that thread, the solution is to have seperate StartCutscene/EndCutscene commands in each room.

EDIT (after Ishmael): I've not had it happen to me, either. This was more 'just in case'.
Title: Re: Cutscene help.
Post by: Ishmael on Sun 23/04/2006 13:17:31
Huh? I made a cutscene that spanned three rooms, and it worked just fine...

(Though I was using 2.56d or 2.55...)
Title: Re: Cutscene help.
Post by: Mr Flibble on Sun 23/04/2006 13:20:06
Its possible that Afflict is referring to making the cutscene play out in the next room, which would simply require some variable manipulation.
Ie. The cutsceney events happen in the next room if a variable is set to (for example) 1, and at the end of the cutscene the variable gets set to something else, so that the cutscene won't happen every time the player walks into the room.

Is this what you meant?
Title: Re: Cutscene help.
Post by: Afflict on Sun 23/04/2006 13:58:57
Ok well check this out.

I have a cutscene that plays when the player enters a room now. The main problem now is isnt it possible to make some little "in game movies" (cutscenes) That get called upon sometimes?

Anyway the main problem I am facing now is the fact that I have a cutscene that plays out the first time the player enters that room. However The player can enter that same room in two different ways.

Eg: Two doors leading to same room the one door will play a cutscene (custscene 1) and the other door must play cutscene2 how can i achieve this cause it wont work with first time player enters room ??

Thanks guys the advice so far has helped me :)

Mr fibble I think the variable thing might work here.. Any advice or example I look at or use?
Title: Re: Cutscene help.
Post by: Ashen on Sun 23/04/2006 14:14:59
OK, I was thinking the problem to be more difficult that it actually was. The BFAQ has some basics on variables (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#Working_with_variables:_the_basics), if you need them (it also has some very basic advice on Cutscenes (http://americangirlscouts.org/agswiki/index.php/Graphics%2C_Characters%2C_Text_%26_Rooms#Adding_an_intro.2Fcutscene_to_your_game)). Basically, and in psuedocode:

//Script for Room 1

//code for Door1:
DoorUsed = 1;
player.ChangeRoom(2, 50, 150);


//code for Door2:
DoorUsed = 2;
player.ChangeRoom(2, 270, 175);



//Script for Room 2

//Code for one of the 'Player enters Room' interactions
if (DoorUsed == 1) {
  // Cutscene 1 code
}
else if (DoorUsed == 2) {
  //Cutscene 2 code
}
DoorUsed = 0; // So cutscenes won't be triggered next time.


If the two doors are from different rooms (e.g. Door1 comes from Room 1, Door2 comes from Room 3), you can just use the player.PreviousRoom property (http://www.adventuregamestudio.co.uk/manual/Character.PreviousRoom.htm), instead of making your own variable.
Title: Re: Cutscene help.
Post by: Afflict on Sun 23/04/2006 14:18:40
Ashen thank you!

This looks perfect. I know a little code (very little) So I started by learning the scripting now I realised that there is a tutorial in the help file that is actualy very helpfull.Ã, 

Hopefully one of these days I'll be the guy helping you answer the questions :)

This code stuff is awesome!

Edit: Not only does it look perfect it works perfect... Thank you Ashen!