Time for action – creating some Track Events for a sequence

For this example, we will add some Track Events to the Track View sequence created in the Creating a new Track View sequence and Animating a camera in Track View sections of this chapter.

  1. You should have the my_first_cutscene cutscene open in Track View and your view set to that of the camera.
  2. First we must define some Track Events. Open the my_first_cutscene sequence.

    Note

    Track Events are defined per the Track View sequence.

  3. Once opened, right-click on the sequence in the tree view on the left-hand side of the Track View window, and select the Edit Events option, as shown in the following screenshot:
    Time for action – creating some Track Events for a sequence

    A dialog box labeled Track View Events will open.

  4. To create a Track Event, select the Add button and give the event a name. The event will then be added to the list.
  5. To remove this event, select it from the list and select the Remove button. When you are done, select the OK button to save your changes.
  6. Create a new event named sequence_started, as shown in the following screenshot:
    Time for action – creating some Track Events for a sequence

    The Track Event Node will allow you to call a Track Event from the sequence.

  7. To add the node to your sequence, right-click on the sequence in the tree view on the left-hand side of the Track View window, and select the Add Event option towards the bottom.
  8. Give the node a name and it will then be added to your sequence.

    From here, you will be able to add keys to toggle the Track Events just like any other node.

    Time for action – creating some Track Events for a sequence
  9. If you select any of the keys you created on the Event track, you can assign one of your predefined event names to it by choosing them on the right-hand side menu, called Key Properties. You can also edit the list of Track Events for the sequence quickly by double-clicking on Edit Track Events.

    The next step will be to add this event to a Flow Graph.

  10. To add your Flow graph logic, you will first need to either create a new graph or open an existing one.
  11. Place a Track Event Node, which can be done by right-clicking anywhere in the graph and selecting it from the context menu, as shown in the following screenshot:
    Time for action – creating some Track Events for a sequence
  12. The node will initially be empty and you will need to select your animation sequence for the Sequence input port. Set the Sequence input port to my_first_cutscene.
  13. Once you select a valid sequence, an output port will be created for each Track Event owned by that sequence. As shown in the following screenshot, the sequence started event was created:
    Time for action – creating some Track Events for a sequence
  14. From this point, create your Flow graph logic using the created output ports.

When these events are triggered from the animation sequence as it plays through, the output ports will trigger, allowing your Flow graph logic to execute.

What just happened?

Track Events allow for direct triggering at particular times within a sequence to the Flow Graph. This allows for an extremely complex combination of animation and Flow Graphed physics or effects to be triggered directly from a sequence.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.233.205