Skipping Cutscenes Questions

Started by ColtonPhillips, Thu 19/11/2009 10:55:40

Previous topic - Next topic

ColtonPhillips

Is there a way to prompt a skipping cutscenes question.

Like,
The player tries to skip the scene and a GUI display asks the user "Are you sure you want to skip" with a choice.

So yah, is that at all possible? 

My best guess is to have something in the global script that tests if a cutscene is running, and if a click is made it loads the gui and responds. I dunno, that's why I have you beautiful people to help me. ;D

Also is there a way to do additional scripting if a cutscene is skipped. Example
Player skips cutscene and the Character asks "Hey whats the deal. Why did you skip the cut scene. It was the best part"

Thanks alot!

Divon

#1
I take it the cut scene is probably taking place in a playable room or something right?

You could define a variable in the rooms script like "int wascutsceneskipped = 0" and then when the player performed whatever action you specified to skip the cutscene you could change the variable to 1.  In the rooms rep exec you could put something like

if(wascutsceneskipped==1)
{
    //What happens when the player skips a cutscene
    player.say("WHY DID YOU SKIP THIS AWESOME SCENE NERD??");
}

Boolean value would make more sense I guess than an int...but I prefer using ints usually...because I am strange.

EDIT:  before I suggest any further, let me ask -- does this cutscene trigger any other rooms?  As in like, when the cutscene ends, will a new room load right away?  Or is the whole cutscene completely independant to the room you're in?  The reason I ask is because I personally would handle the skipping portion two different ways if theres multiple rooms involved (although other people may have better suggestions).

ColtonPhillips

I'm talking about working with the already made Cutscene functions in AGS where skipping a cutscene is predefined.

Is there anyway to work with that? And how would you set that flag that you just mentioned by skipping a cutscene

Wonkyth

I'm not sure, but you might be able to do something using the SkippingCutscene property. :-\
"But with a ninja on your face, you live longer!"

Khris

You have to try out what the game does if you e.g. set Esc to skip the cutscene, then try to intercept the keypress in rep_ex_always.

Code: ags
function repeatedly_execute_always() {
  if (Game.InSkippableCutscene && IsKeyPressed(eKeyEscape)) {
    Display("You tried to skip.");
  }
}


If the game skips without displaying the text, you have to include the skipping manually, as if there were no Start/EndCutscene commands.
If it does display the text, the question remains how to tell AGS that the Cutscene is supposed to be skipped now.

It certainly does look like you'll have to do it completely on your own, using custom functions all the way through the cutscene that can skip at any point during speech or walks as soon as rep_ex_always changes a custom do_skip variable to true.

Divon

#5
I'm doing this off the top of my head, so theres a large possibility that I just overlooked something extremely obvious/wrong in my code, but what about something like:

int cutsceneactive=0;
int wascutsceneskipped=0;

function repeatedly_execute_always()
{
  if(cutsceneactive==1 && wascutsceneskipped==1)
  {
      //What happens when the player skips a cutscene
      player.say("WHY DID YOU SKIP THIS AWESOME SCENE NERD??");
       Wait(120);
      player.changeroom(2, 100, 100);  //Changing rooms out of the cutscene room
  }

  if(IsKeyPressed(eKeyEscape))   wascutsceneskipped=1;
}


function room_AfterFadeIn()  //OR WHATEVER FUNCTION IS MORE APPROPRIATE FOR THE CUTSCENE!
{
 //start cutscene sequence
 cutsceneactive=1;
 player.say("blah blah blah");
 BLAH BLAH BLAH CODE ETC ETC ETC
 BLAH BLAH BLAH CODE LIKE WALKS AND WAITS, ETC
 player.changeroom(2, 100, 100);  //Changing rooms out of the cutscene room
 //end cutscene sequence
}

ColtonPhillips

Divon your code would work quite fine if I had a specific room for cutscenes.  But my cutscenes will be in the rooms that have action in the.

Sounds like the only way is to have in the repeatably executable for when you try and skip to manually move all your objects and characters to their states after the cutscene, and then never go into the cutscene script again?

Am I right?

SMF spam blocked by CleanTalk