Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Lewis on Tue 27/03/2012 01:08:05

Title: Switching to different dialogue after cutscene [Fixed, turns out I'm an idiot]
Post by: Lewis on Tue 27/03/2012 01:08:05
I imagine this is going to become massively obvious after a night's sleep, so I apologise in advance. However, I just cannot get my head around the following.

I have a character who has two possible dialogue files for a particular room. The idea is that if you click on him at the start of the scene he'll have one conversation with you, but if you click on him later in the scene he'll have a completely different one.

But there's no obvious change of state between the two occasions. The scene starts, there's a bit of minor interaction, then there's a cutscene. It's after this cutscene that the dialogue upon interaction should change.

I've sat scratching my head for ages, battled with the forum's search function, and I'm none the wiser. I think my ability to parse logic has just exploded.

EDIT: Actually, that's confusing, let me simplify it.

Scene starts.
When player clicks on cChar1, dDialogue1 should start.
After this, there's a small puzzle that doesn't utilise inventory or anything.
Then a cutscene plays.
Now, when player clicks on cChar1, dDialogue2 should start.

Thanks in advance!
Title: Re: Switching to different dialogue after cutscene
Post by: Khris on Tue 27/03/2012 01:50:19
Use a variable.

Open the Global variables pane and add an int; call it something like "cutscene_happened" and set its initial value to 0.
(You might want to use a name that's a bit more specific to the character / game situation.)

During the cutscene, call
  cutscene_happened = 1;

In the character's talk interaction:
  if (cutscene_happened) dDialogue2.Start();
  else dDialogue1.Start();


Title: Re: Switching to different dialogue after cutscene
Post by: Lewis on Tue 27/03/2012 09:33:07
Of course. Obviously. I'm baffled that I didn't think of this.

Thanks so much for acting as my temporary brain. :-D