Forum rules - please read before posting.

Check if an action/actionlist is currently running

edited October 2018 in Technical Q&A
I'd like to be able to check from an Update() function in a script if an action/actionlist is currently running. In the documentation I can only find functions that handle SPECIFIC actionlists (presuming you already know which specific actionlist you want to check), but is there a way to check if ANY actionlist whatsoever is currently running?

Comments

  • There isn't a need for AC itself to know this, but you can calculate it with:

    If you're just trying to learn if you're in "cutscene" mode, however, then you can simply read:

    AC.KickStarter.stateHandler.IsInCutscene ();
  • Thank you @ChrisIceBox .

    Actually this was a blunder from my side. It turns out that what I needed to know was if gameplay is currently blocked, which can of course easily be done with ActionListManager.IsGameplayBlocked().
  • There's a few outlier cases where that'll return false but gameplay is disabled, e.g. when the player is moving towards a Hotspot.  Better to use:

    !AC.KickStarter.stateHandler.IsInGameplay ();
  • I'll mark that, thank you.
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.