Forum rules - please read before posting.

Timeline again! Launching actions/dialogue

Hey,

Just wanted to say thanks, your purchase has really sped up my development so far and its been amazing! I am not one to go straight to writing a new forum but would like some advice.

I would like to know if there was a way to trigger a dialogue or action from within a timeline?

I currently have made a timeline cinematic but wanted to keep things consistent and use AC Dialogue System to display lines of text within these Cinematics?

I would love to use the CInemachine Camera System for Cinematics but am struggling to combine or use just Cinemachine to achieve this?

For now to my first question, if i can trigger AC actions via Timeline this would be amazing.

Is this possible ATM or maybe only in a future update? Any advice is greatly appreciated!!

Many thanks,

FeelingTerrible

Comments

  • Welcome to the community, @FeelingTerrible.

    Any AC ActionList/Trigger can be invoked by calling its Interact() function - see the "Interaction scripting" chapter of the Manual for more on that.

    With regular animations, this can be done by using Animation Events.  However, Timeline does not (as yet) support events - which IMO is a massive oversight as it severely restricts the usages it can have.

    A discussion (with a few workarounds) can be found on the Unity forums here: https://forum.unity.com/threads/timeline-events.479400/

    At the moment, it seems like the easiest way to do this currently is to place the code you want to run in a new C# script's OnEnable function, i.e.:

    private void OnEnable ()
    {
      GameObject.Find ("MyCutsceneObject").GetComponent<AC.ActionList>().Interact ();
    }


    And then use timeline to enable that object at the point you want the cutscene / ActionList to run.  This is as suggested in this thread: https://forum.unity.com/threads/running-a-script-in-animation-timeline.431919/

    Another, script-free but still a workaround, method would be to run another AC ActionList at the same time that this Timeline begins.  Set this ActionList's When running field to Run In Background so that it doesn't interfere with gameplay, and give it a single Engine: Wait Action (that lasts the same duration as the point along the Timeline you want the "proper" Actions to occur) followed by an ActionList: Run Action that runs the other Actions you want.
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.