Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Game Creator 3 logo Dialogue

Active Line Actor Expression ID#

Game Creator / Dialogue / Active Line Actor Expression ID

  • Can Read

  • Cannot Write

Description#

Returns the Actor Expression ID value of the current active line of the Dialogue component

Code#

using System;
using UnityEngine;
using VisualScript.Icons;
using VisualScript.Runtime;

namespace GameCreator.Runtime.Dialogue
{
    [Get]

    [Title("Active Line Actor Expression ID")]
    [Category("Game Creator/Dialogue/Active Line Actor Expression ID")]

    [Description("Returns the Actor Expression ID value of the current active line of the Dialogue component")]
    [Image(typeof(IconScriptActor), ColorTheme.Type.TextLight, typeof(BadgeHash))]

    [Serializable]
    public class TypeStringDialogueActiveLineActorExpressionID : TypeString
    {
        [SerializeField] private GetGameObject m_Dialogue = new GetGameObject(
            new TypeGameObjectDialogue()
        );

        public override string Get(Args args)
        {
            Dialogue dialogue = this.m_Dialogue.Get<Dialogue>(args);
            if (dialogue == null || dialogue.CurrentNode is not NodeText nodeText) return string.Empty;

            ScriptActor actor = RuntimeScript.GetActor(dialogue.CurrentRuntimeScript, nodeText.Actor);
            if (actor == null) return string.Empty;

            return actor.TryGetExpression(nodeText.Expression, out Expression expression)
                ? expression?.Id.String
                : string.Empty;
        }

        public override string ToString()
        {
            return $"Active {this.m_Dialogue} Actor Expression ID";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Game Creator 3 logoGame Creator 3 © Catsoft Works 2026. All rights reserved.