ActorScript
Summary
Represents a scriptable actor that provides a foundational blank slate for custom gameplay behaviours.
Remarks
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.
Parameters:
payload(ScriptPayload): The creation payload containing initialisation state and veto controls.
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.
protected virtual Void OnBegin()
Summary: Invoked when this actor begins ticking.
Remarks:
protected virtual Void OnTick(Single dt)
Summary: Invoked every frame during the engine update cycle.
Parameters:
dt(Single): The delta time in seconds elapsed since the previous frame.
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:
ts(Single): The fixed timestep duration in seconds.
protected virtual Void OnEnd()
Summary: Invoked when this actor ceases ticking.
Remarks:
protected virtual Void OnKill()
Summary: Invoked when this actor is killed or marked for destruction.
Remarks:
protected virtual Void OnDestroy()
Summary: Invoked when the script instance is destroyed.
Remarks: