Represent any existing object in the 3D world of Northgard.

Variables

x:Float

[HostOnly] The X coordinate of the entity

y:Float

[HostOnly] The Y coordinate of the entity

z:Float

[HostOnly] The Z (height) coordinate of the entity

zone:Zone

[HostOnly] The zone where the entity is. Updated during unit movements.

Methods

isRemoved():Bool

Check if an entity have already been removed during the current update frame.

Returns:

Bool

orientToPos(x:Float, y:Float):Void

[HostOnly] Immediately turn the entity toward coordinates.

Parameters:

x
null

y

orientToTarget(target:Entity):Void

[HostOnly] Immediately turn the entity toward a given target.

Parameters:

null

target

setPosition(x:Float, y:Float):Void

[HostOnly] Set the position of the entity on the X and Y axis, figuring out the Z relative to the terrain's height.

Parameters:

x
null

y

sfx(name:String, ?volumeScale:Float):Void

Play a sfx from the resource pack. The sfx will be localised in the 3D world.

Parameters:

name
[Optional]

volumeScale A volume factor, 1 plays the sound as intended, 10 increase the volume tenfold. Default at 1.