ActorScript

Summary

Represents a scriptable actor that provides a foundational blank slate for custom gameplay behaviours.

Remarks

Master Thread: Operations on this type interact directly with scene and engine state, and must be executed exclusively on the Master Thread.

Definition

Namespace: SDT4.Managed.Core.Script
Assembly: SDT4.Managed.Core.dll

class ActorScript
Inheritance:

Object ➔ Actor ➔ ActorScript

Implements:

IScriptTarget

Fields

Name Type Description

Properties

Name Type Description
public get; UniqueIdentifier Guid Gets the globally unique identifier of this actor, corresponding to Actor.GlobalId.

Methods

protected virtual Void OnCreate(ScriptPayload payload)

Summary: Invoked when the script is being created.

Remarks: The level may not have started playing yet, and rigid bodies will not have been added at this stage. Creation may be vetoed via ScriptPayload.Veto. If creation is vetoed, it is strongly assumed that the actor is in a safe state to be removed from memory with no dangling references. Actor States: Script: Valid Physics: Invalid Renderer: Invalid

Parameters:


protected virtual Void OnSpawn()

Summary: Invoked when the actor is fully initialised, but before it starts ticking.

Remarks: The level might not have been fully loaded at this point. Actor States: Script: Valid Physics: Valid Renderer: Valid


protected virtual Void OnBegin()

Summary: Invoked when this actor begins ticking.

Remarks: Actor States: Script: Valid Physics: Valid Renderer: Valid


protected virtual Void OnTick(Single dt)

Summary: Invoked every frame during the engine update cycle.

Parameters:


protected virtual Void OnStep(Single ts)

Summary: Invoked per fixed physics step. May be called multiple times per frame, or skipped entirely if frame rate permits.

Parameters:


protected virtual Void OnEnd()

Summary: Invoked when this actor ceases ticking.

Remarks: Actor States: Script: Valid Physics: Valid Renderer: Valid


protected virtual Void OnKill()

Summary: Invoked when this actor is killed or marked for destruction.

Remarks: Actor States: Script: Valid Physics: Valid Renderer: Valid


protected virtual Void OnDestroy()

Summary: Invoked when the script instance is destroyed.

Remarks: Actor States: Script: Valid Physics: Invalid Renderer: Unknown