Forum rules - please read before posting.

Skip cutscene prompt [solved]

edited June 2014 in Technical Q&A
Heya,

I want to make a little menu in a corner of the screen that turns on during a cutscene telling you you can skip it by pressing the spacebar. Only thing is not every cutscene is skippable ofcourse, so I was wondering if there is a script command to check whether a running cutscene is marked skippable or not? I've seen that ActionList has a property isSkippable, but I'm not sure how to access the current running one.

So far I have this:

void Update() {
if (stateHandler.gameState == AC.GameState.Cutscene)
AC.PlayerMenus.GetMenuWithName("Skip").TurnOn(true);
}

Comments

  • I shall add this in the next update, but add this to the ActionListManager script and you can use it to check if you're in a skippable cutscene or not:

    public bool
     IsInSkippableCutscene ()
    {
      if (runtimeActionList.IsRunning ())
      {
        return true;
      }
     
      foreach (ActionList list in activeLists)
      {
        if (list.actionListType == AC.ActionListType.PauseGameplay && list.isSkippable)
        {
          return true;
        }
      }
      return false;
    }


    You can then access it with:

    GameObject.FindWithTag (Tags.gameEngine).GetComponent <ActionListManager>().IsInSkippableCutscene ();

  • Rad that worked, thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.