Forum rules - please read before posting.

Wait until Variable is True

action wait until variable is true.
how I will do this.

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

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.