Skip to main content

Miscellaneous Data Types

Vector2

Vector2 represents a 2D vector, and has the constructor function Vector2(x: float, y: float): Vector2.

PropertyTypeDescription
xfloatX component of the vector
yfloatY component of the vector

Example

function addVector2s(vec1, vec2)
return Vector2(vec1.x + vec2.x, vec1.y + vec2.y)
end

v1 = Vector2(1.5, 2)
v2 = Vector2(2, 3)
v3 = addVector2s(v1, v2)

Vector

Vector represents a 3D vector, and has the constructor function Vector(x: float, y: float, z: float): Vector.

PropertyTypeDescription
xfloatX component of the vector
yfloatY component of the vector
zfloatZ component of the vector

Vector4

Vector4 represents a 4D vector, and has the constructor function Vector4(x: float, y: float, z: float, w: float): Vector4.

PropertyTypeDescription
xfloatX component of the vector
yfloatY component of the vector
zfloatZ component of the vector
wfloatW component of the vector

DamageNumber Class

DamageNumber represents a damage number. Has the constructor function DamageNumber(number: integer, persistTime: float, location: Vector4, isShield: boolean)

Properties

PropertyTypeDescription
numberintegerThe number value of the damage
timefloatThe remaining time this damage number should persist for
locationVector4The world-space location of the damage number
colorColorThe current colour of the damage number
scalefloatThe current scale of the damage number (1.0 = normal)
shieldDamagebooleanWhether the damage number represents shield damage

DamageNumberArray class

DamageNumberArray represents a C++ array of damage numbers.

Methods

DamageNumberArray:add(item: DamageNumber)

Adds an item to the array.

DamageNumberArray:remove(index: integer)

Removes the item at the given index.

DamageNumberArray:clear()

Clears all elements from the array.

DamageNumberArray:size(): integer

Gets the number of elements in the array.

DamageNumberArray:get(index: integer): DamageNumber

Gets the element at the given index.

DamageNumberArray:set(index: integer, item: DamageNumber)

Sets the element at the given index.

Object

Object represents a generic Unreal Engine object.

Methods

Object:getName(): string

Gets the name of this object.

Object:getClassName(): string

Gets the name of this object's class.

Object:getFullName(): string

Gets the full Unreal name for this object.

FloatArray

FloatArray represents a C++ array of floating point numbers.

Methods

FloatArray:add(item: float)

Adds an item to the array.

FloatArray:remove(index: integer)

Removes the item at the given index.

FloatArray:clear()

Clears all elements from the array.

FloatArray:size(): integer

Gets the number of elements in the array.

FloatArray:get(index: integer): float

Gets the element at the given index.

FloatArray:set(index: integer, item: float)

Sets the element at the given index.