SOLVED: Character disappears in opening "cut scene"

Started by Thegluestickman, Thu 25/11/2010 03:43:23

Previous topic - Next topic

Thegluestickman

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.

Ryan Timothy B

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.

monkey0506

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.

Ryan Timothy B

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.

ThreeOhFour

I'd question this bit:

Code: ags

  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);

Thegluestickman

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:

Code: ags

  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.

Thegluestickman

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?

Wersus

You could put the "cDave.ChangeRoom (2);" into the end of the dialog.

Thegluestickman

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?

Thegluestickman

Never mind.

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

SMF spam blocked by CleanTalk