[Solved] Branching cutscene?

Started by Prozail, Thu 19/07/2012 16:40:26

Previous topic - Next topic

Prozail

I'm trying to make a cutscene where the player is given the choice to
either say yes or no a few times.
No im prob a big noob here.. but... i just can't get this to work.

At certain points when a certain event happens, i set a global variable,
and switch player character to another guy in another room.

In the AfterFadeIn i check the global variable and run the appropriate cutscene script.
When the script is finished i simply change the player character back.

Now this works well, as long as the player doesn't need to make a choice during the cutscene..



Code: AGS

function Scene1()
{
cWith.Say("chatty textlines...");
cWith.Say("chatty textlines...");
cWith.Say("chatty textlines...");

// <-- here i want the player to make a Yes/No choice before the rest of the script continues.

cWith.Say("more chatty textlines...");
cWith.Say("more chatty textlines...");

cEgo.SetAsPlayer();
}

function room_AfterFadeIn()
{
  if (runScene==1)
    Scene1();
  if (runScene==2)
    Scene2();
//etc....
}  



now.. whatever i do... The script runs until it's finished, and then my choice is displayed (afterwards)
I've tried GUI's and dialogs (Dialogs will prob. work, but it will be one hell of a complex dialog.. lots of code stuff going on.)

Is there an easy way to do it that I'm just missing??


Edit:
Nevermind i solved it myself.. If anyone wonders how, i made a dummy dialog that just contained the options i wanted, and then used:

Code: AGS

cWith.Say("chatty textlines...");
int a=dDialog1.DisplayOptions(eSayNever);
if (a==1)
    cWith.Say("Yes-option response...");
else
    cWith.Say("No-option response...");

//etc...

Khris

Nice, the existence of this function went past me completely, until now :)

SMF spam blocked by CleanTalk