Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Thegluestickman on Thu 25/11/2010 03:43:23

Title: SOLVED: Character disappears in opening "cut scene"
Post by: Thegluestickman on Thu 25/11/2010 03:43:23
Hello,

Recently got back into AGS for an adventure game about a band. Anyway that's not important, my character disappears when I make him change rooms just for the opening cinematic.

The code on the "FirstLoad" action is:


function room_FirstLoad()
{
  SetBackgroundFrame(1);
  cMike.LockView(3);
  Display ("You have begun a quest.");
  Display ("A quest to become the most listened to band");
  Display ("You are Mike, the drummer of this band.");
  Display ("Your band members are: Dave the vocalist, Arlen the bassist, and Orion the guitarist.");
  Display ("Cool names eh?");
  Display ("The story begins in your Appartment"); 
    SetBackgroundFrame(0);
  cMike.UnlockView();
  cDave.ChangeRoom(1, 300, 395);
  cDave.Walk (165, 250);
dIntroDialog.Start();
cDave.ChangeRoom (2);
}

He talks but he is not visible. His starting room was 0 but then I changed to 2 to see if it made any difference. He still is disappearing.
Title: Re: Character disappears in opening "cut scene"
Post by: Ryan Timothy B on Thu 25/11/2010 04:07:32
What are the starting coordinates of Mike, whom I'm assuming is the player character? It's possibly he is being drawn off the edge of the room background.

Also his view and loop may have a blank sprite.

On a side note: it's 'apartment' with only one P.


If Mike is the player character, you should set him as the player character. That way whatever room he is in, the game will change to that room.
Title: Re: Character disappears in opening "cut scene"
Post by: monkey0506 on Thu 25/11/2010 05:28:22
I don't have AGS on this computer so I'm not 100% certain what it's called, but there should also be a property for the room..something like ShowPlayer or ShowPlayerInRoom. If it's set to false (or possibly true depending if it might be HidePlayer) then your player will be invisible within the room.
Title: Re: Character disappears in opening "cut scene"
Post by: Ryan Timothy B on Thu 25/11/2010 05:40:55
Oh wow, I honestly didn't know that each room had a ShowPlayerCharacter option. Looks as though this option can't be changed during script though. What a shame.

So yes Stickman, as Monkey said, it is one possibility why your player character isn't visible (assuming Mike is your player character). You may have changed it to false in the room setup.
Title: Re: Character disappears in opening "cut scene"
Post by: ThreeOhFour on Thu 25/11/2010 06:40:03
I'd question this bit:


 cDave.ChangeRoom(1, 300, 395);
 cDave.Walk (165, 250);


I'd suggest trying cDave.Walk(165, 250, eBlock);

Depending on walkable areas, you might also need to do  cDave.Walk(165, 250, eBlock, eAnyWhere);
Title: Re: Character disappears in opening "cut scene"
Post by: Thegluestickman on Thu 25/11/2010 12:35:56
Quote from: Ryan Timothy on Thu 25/11/2010 04:07:32
What are the starting coordinates of Mike, whom I'm assuming is the player character? It's possibly he is being drawn off the edge of the room background.

Also his view and loop may have a blank sprite.

On a side note: it's 'apartment' with only one P.


If Mike is the player character, you should set him as the player character. That way whatever room he is in, the game will change to that room.

The starting coordinates of Mike is 160 and 290. I should have specified DAVE doesn't show up.

and, dammit! Ags needs a spell checker :|

Quote from: Ryan Timothy on Thu 25/11/2010 05:40:55
Oh wow, I honestly didn't know that each room had a ShowPlayerCharacter option. Looks as though this option can't be changed during script though. What a shame.

So yes Stickman, as Monkey said, it is one possibility why your player character isn't visible (assuming Mike is your player character). You may have changed it to false in the room setup.

I also had Dave start in the room, but he disappeared after the text. The game showed the room for a second and went black like it's supposed too, but Dave did not reappear only Mike did.

Quote from: Ben304 on Thu 25/11/2010 06:40:03
I'd question this bit:


 cDave.ChangeRoom(1, 300, 395);
 cDave.Walk (165, 250);


I'd suggest trying cDave.Walk(165, 250, eBlock);

Depending on walkable areas, you might also need to do  cDave.Walk(165, 250, eBlock, eAnyWhere);

Added those, he appears but when the dialog comes up he's gone.

Thanks for all your help.
Title: Re: Character disappears in opening "cut scene"
Post by: Thegluestickman on Thu 25/11/2010 12:38:27
I see what's the matter, It doesn't start the dialog before he leaves the room. Any scripts that block the script from running on a dialog?
Title: Re: Character disappears in opening "cut scene"
Post by: Wersus on Thu 25/11/2010 13:00:44
You could put the "cDave.ChangeRoom (2);" into the end of the dialog.
Title: Re: Character disappears in opening "cut scene"
Post by: Thegluestickman on Thu 25/11/2010 23:01:52
Quote from: Wersus on Thu 25/11/2010 13:00:44
You could put the "cDave.ChangeRoom (2);" into the end of the dialog.
How would I go about doing this?
Title: Re: Character disappears in opening "cut scene"
Post by: Thegluestickman on Thu 25/11/2010 23:24:39
Never mind.

Didn't realize you had to indent lines for it be recognized as code. Thanks for the help all.