Performances

Full API reference for the DialoguePerformance base class and built-in performance types — MoveTo, PathTo, and RepositionPerformer.

Performances are asynchronous actions executed from PerformanceNodeData nodes within a dialogue sequence. When the Dialogue Sequencer encounters a performance node, it instantiates the appropriate DialoguePerformance subclass, starts it, and waits for it to signal completion before advancing to the next node.

All performances are polymorphic by extending the class they automatically populate the performances list when adding performances to a node.

For usage guides and setup examples, see The Basics: GS_Cinematics.

 

Contents


DialoguePerformance (Abstract Base)

The base class for all dialogue performances. Extends AZ::TickBus::Handler so that performances can drive time-based behavior across multiple frames.

PropertyTypeDescription
TypeId{BCCF5C52-42C3-49D4-8202-958120EA8743}
Tick HandlerAZ::TickBus::HandlerPerformances connect to TickBus during execution for frame-by-frame updates.

Virtual Methods

MethodDescription
DoPerformance()Entry point called by the sequencer. Sets up the performance and calls ExecutePerformance().
ExecutePerformance()Core execution logic. Override this in subclasses to implement the actual behavior (movement, animation, etc.).
FinishPerformance()Called when the performance is complete. Disconnects from TickBus and signals the sequencer via DialogueSequencerRequestBus::OnPerformanceComplete().

Lifecycle

  1. The sequencer encounters a PerformanceNodeData and instantiates the corresponding DialoguePerformance subclass.
  2. The sequencer calls DoPerformance().
  3. DoPerformance() connects to TickBus and calls ExecutePerformance().
  4. The performance runs across multiple ticks until its completion condition is met.
  5. The performance calls FinishPerformance(), which disconnects from TickBus and notifies the sequencer.
  6. The sequencer advances to the next node.

MoveTo_DialoguePerformance

Moves a performer entity to a named stage marker position over time using direct interpolation (no navmesh). Suitable for short-distance movements within a scene where pathfinding is unnecessary.

PropertyTypeDescription
TypeId{6033A69D-F46F-40DF-A4A0-A64C4E28D6D5}
TargetStage marker nameThe destination position, resolved through CinematicsManagerRequestBus::GetStageMarker().
Speed / DurationfloatControls how quickly the performer reaches the target.

Request Bus: MoveTo_PerformanceRequestBus

MethodParametersReturnsDescription
StartMoveToAZ::EntityId performer, AZ::Vector3 target, float speedvoidBegins moving the performer entity toward the target position.

Notification Bus: MoveTo_PerformanceNotificationBus

EventDescription
OnMoveToCompleteFired when the performer reaches the target position. The performance calls FinishPerformance() in response.

PathTo_DialoguePerformance

Navigates a performer entity to a named stage marker along a RecastNavigation navmesh path. Suitable for longer-distance movements where the performer must navigate around obstacles. Requires RecastNavigation to be enabled in the project.

PropertyTypeDescription
TypeId{C0DF4B0E-924D-4C38-BD26-5A286161D95C}
TargetStage marker nameThe destination position, resolved through CinematicsManagerRequestBus::GetStageMarker().
NavigationRecastNavigationUses the navmesh to compute a valid path from the performer’s current position to the target.

Request Bus: PathTo_PerformanceRequestBus

MethodParametersReturnsDescription
StartPathToAZ::EntityId performer, AZ::Vector3 targetvoidComputes a navmesh path and begins navigating the performer toward the target.

Notification Bus: PathTo_PerformanceNotificationBus

EventDescription
OnPathToCompleteFired when the performer reaches the end of the computed path. The performance calls FinishPerformance() in response.

RepositionPerformer_DialoguePerformance

Instantly teleports a performer entity to a named stage marker position. No interpolation, no pathfinding – the entity is moved in a single frame. Useful for off-screen repositioning between scenes or for snapping a performer to a mark before a sequence begins.

PropertyTypeDescription
TypeId{DE1E0930-F0A4-4F60-A741-4FB530610AEE}
TargetStage marker nameThe destination position, resolved through CinematicsManagerRequestBus::GetStageMarker().

Notification Bus: RepositionPerformer_PerformanceNotificationBus

EventDescription
OnRepositionCompleteFired immediately after the performer is teleported. The performance calls FinishPerformance() in the same frame.

Complete Performance Type Reference

TypeTypeIdMovementNavigation
DialoguePerformance{BCCF5C52-42C3-49D4-8202-958120EA8743}Abstract base
MoveTo_DialoguePerformance{6033A69D-F46F-40DF-A4A0-A64C4E28D6D5}InterpolatedNone
PathTo_DialoguePerformance{C0DF4B0E-924D-4C38-BD26-5A286161D95C}Navmesh pathRecastNavigation
RepositionPerformer_DialoguePerformance{DE1E0930-F0A4-4F60-A741-4FB530610AEE}Instant teleportNone

Creating a Custom Performance

To add a custom performance type from an external gem:

1. Define the class

#pragma once
#include <GS_Cinematics/Dialogue/Performances/DialoguePerformance.h>

namespace MyGem
{
    class PlayAnimation_DialoguePerformance : public GS_Cinematics::DialoguePerformance
    {
    public:
        AZ_RTTI(PlayAnimation_DialoguePerformance, "{YOUR-UUID-HERE}", GS_Cinematics::DialoguePerformance);
        AZ_CLASS_ALLOCATOR(PlayAnimation_DialoguePerformance, AZ::SystemAllocator);

        static void Reflect(AZ::ReflectContext* context);

    protected:
        void ExecutePerformance() override;
        void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;

    private:
        AZStd::string m_animationName;
        bool m_animationComplete = false;
    };
}

2. Implement and register

void PlayAnimation_DialoguePerformance::ExecutePerformance()
{
    // Start the animation on the performer entity
    // Listen for animation completion
}

void PlayAnimation_DialoguePerformance::OnTick(float deltaTime, AZ::ScriptTimePoint time)
{
    if (m_animationComplete)
    {
        FinishPerformance();
    }
}

See Also

For conceptual overviews and usage guides:

For component references:

For related resources:


Get GS_Cinematics

GS_Cinematics — Explore this gem on the product page and add it to your project.