Switching to different dialogue after cutscene [Fixed, turns out I'm an idiot]

Started by Lewis, Tue 27/03/2012 01:08:05

Previous topic - Next topic

Lewis

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!
Returning to AGS after a hiatus. Co-director of Richard & Alice and The Charnel House Trilogy.

Khris

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
Code: ags
  cutscene_happened = 1;


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



Lewis

Of course. Obviously. I'm baffled that I didn't think of this.

Thanks so much for acting as my temporary brain. :-D
Returning to AGS after a hiatus. Co-director of Richard & Alice and The Charnel House Trilogy.

SMF spam blocked by CleanTalk