You can loop a Variable: Check Action onto itself in an ActionList that has its When running field set to Run In Background, so that it doesn't interfere with gameplay while running. When the check returns True, you can run a new ActionList that does what you need while blocking gameplay.
Alternatively, you can hook into the OnVariableChange custom event so that you can avoid a looping ActionList. Here's a sample script to demonstrate:
Paste it into a new C# file named WaitForVariable, and add it to your scene. Set the "My Variable Label" and "Cutscene To Run" fields in the Inspector, and the cutscene will run when the global boolean variable you name is set to True. Replace "Cutscene" with "ActionListAsset" if you want to run an asset file.
Comments
You can loop a Variable: Check Action onto itself in an ActionList that has its When running field set to Run In Background, so that it doesn't interfere with gameplay while running. When the check returns True, you can run a new ActionList that does what you need while blocking gameplay.
Alternatively, you can hook into the OnVariableChange custom event so that you can avoid a looping ActionList. Here's a sample script to demonstrate:
http://pasteall.org/1442844/csharp
Paste it into a new C# file named WaitForVariable, and add it to your scene. Set the "My Variable Label" and "Cutscene To Run" fields in the Inspector, and the cutscene will run when the global boolean variable you name is set to True. Replace "Cutscene" with "ActionListAsset" if you want to run an asset file.
thank you For your reply