Hi there,
I need to run a PlayMaker action that checks if the game is currently playing ANY cutscene.
So I thought that this method (?) could help me with that...
bool AC.StateHandler.IsInScriptedCutscene ()
But I was unable to find it by dragging the GameEngine gameobject from the Hierarchy, until I've found out that it seems to be accessible from the StateHandler component script.
So I went and added this component to the GameEngine gameobject, so I could drag and drop it to my PlayMaker FSM. But then, hundreds of errors started to appear when I run the project.
Then I tried to create an empty gameobject and put that script in there, all alone. But the same errors started to show again.
So my question is, how could I run and return that value to a PlayMaker action?
That is, if that method will help at all at finding out if the player is involved in a cutscene...
Thank you!
Comments
If you want to read ths IsInScriptedCustscene value, you could write a simple MonoBehaviour script that reads the value and returns it. You could then place it in the scene, and reference that with PM instead.
However, as the API documents, this function only returns true when in a cutscene initiated through a user script (see this tutorial). To check if the user is in a cutscene of any kind, use:
AC.KickStarter.stateHandler.gameState == AC.GameState.Cutscene
as outlined in Section 12.7 of the Manual. Again, if you can't refer to this through PM directly, you can just use an in-between function, i.e.:
public bool IsInCutscene ()
{
return (AC.KickStarter.stateHandler.gameState == AC.GameState.Cutscene);
}
AC.KickStarter.actionListManager.IsGameplayBlocked ()