Forum rules - please read before posting.

Issue with check variable ?

Hello,

I would like to run a cutscene depending on wich page of a diary the player is looking at. The diary is an  another gameobject ( it's not the AC diary). So i've created a global int variable, and linked it to the page number using AC.GlobalVariables.SetIntegerValue(5,1). Till here it's fine, the variable updates with the page number. But the "on variable change custscene" doesn't launch, even if the global variable changes. Which step did i miss ?


Comments

  • edited May 2018
    The "On variable change" Action only runs if you use the Variable: Set Action to modify it.

    If you're using custom code to change it, you can run the necessary scene-based ActionList or ActionList Asset by invoking its Interact() method:

    ActionList myActionList; // Define this in the Inspetctor
    myActionList.Interact ();

    You can replace "ActionList" with "ActionListAsset" to run an asset instead.
  • Thanks Chris ! It works perfectly...
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.