Skip to content

Actor Class

Paulo Rafael edited this page Feb 17, 2024 · 8 revisions

Actor

Actor class is a class made to store ActorDefinition data adapted for Lua,
this page shows accessable keys and methods in this class.

Members

  • TypeId: The type of this actor.
  • Flags: The set of flags of special settings.

Methods

Set a property's value of various property types. Can be mostly used by experts if they plan into actually do any new stuff.

  • Float property: void SetPropertyValue(int id, float value)
  • Integer property: void SetPropertyValue(int id, int value)
  • Vector3 property: void SetPropertyValue(int id, float x, float y, float z)
  • Vector4 property: void SetPropertyValue(int id, float x, float y, float z, float w)
  • Text file property: void SetPropertyValue(int id, short index, short value)
  • Actor property: void SetPropertyValue(int id, Actor actor)

Get property value

  • (dynamic return value) GetPropertyValue(int id)
    NOTE: Only supports only float, integer and actor property types at the moment
    REMINDER: Somate the returned actor ID by 1 before using MISSION.GetActorById(int id)

Returns nil or a number that can match a float, integer and actor ID value.

Color

  • Change color: SetColor(byte r, byte g, byte b, [ byte a = 255)
Clone this wiki locally