Entity Class

Visual representation of a EntityData

Fields

Type Name Static Default Description
EUID__instance PrefabId
ThirdPersonCamera__instance Camera
AnimationTree__instance AnimationTree
Skeleton3D__instance Skeleton
PackedScene__instance Ragdoll
number WalkSpeed
number RunSpeed
number RotationSpeed
number JumpVelocity
number DashPower
number Weight
Dictionary__ItemData__instance__number__instance Inventory Inventory is all items that the entity owns
Array__ItemData__instance__instance Equipment Inventory is all items that the entity has equipped
SkillSaveData[]__instance Knowledge Contains information about the each skill that the entity knows about
number TickRate
number gravity
Vector3__instance HorizontalVelocity
AnimationNodeStateMachinePlayback__instance Animator
Nullable__Vector3__instance__instance Destination The current desired destination where the Entity wants to move towards.
Array__Attack__instance__instance Attacks
State__instance CurrentState
State[]__instance ConfiguredStates
Memory__instance Memory List of events that this entity remembers
Event__Entity__instance__instance OnKilled
Event__instance OnExperienceGained

ReadOnly

Type Name Static Default Description
boolean IsDead
number JogSpeed
LevelNode Level
Vector3 WorldOffset
Vector3 WorldPosition

Properties

Type Getter Setter Static Default Description
ScheduleTask get_CurrentTask() set_CurrentTask(val)
Detail get_Detail() set_Detail(val)
Group get_Group() set_Group(val)
number get_Health() set_Health(val) The current health of the entity
number get_HealthLimit() set_HealthLimit(val) Max health the entity can have
EUID get_Id() set_Id(val) The instance ID of the entity
EUID get_LevelId() set_LevelId(val)
Vector3 get_LevelPosition() set_LevelPosition(val)
List__ScheduleTask get_Tasks() set_Tasks(val) Tasks work on a priority order. Tasks at the TOP of the list must be completed first.

Functions

Requires an instance!

GetScheduledTask

Returns the next Task from the Schedule of this Entity. Yet before this task can be done, any current Tasks must be completed first.

GetScheduledTask() -> ScheduleTask

OnEvaluatePackage(EriosDateTime)

Packages are to be evaluated every hour, or when a package is completed.

OnEvaluatePackage(time: EriosDateTime) -> nil
Type Name Description
EriosDateTime time

TryCreateGroup(Entity)

TryCreateGroup(requester: Entity) -> Group
Type Name Description
Entity requester

GetSpeedModifier

Calculates the speed modifier. Depending on the equipment being worn, terrain and more

GetSpeedModifier() -> number

Damage(WeaponItem)

Damage(source: WeaponItem) -> nil
Type Name Description
WeaponItem source

Damage(Item)

Damage(source: Item) -> nil
Type Name Description
Item source

Damage(number)

Damage(amount: number) -> nil
Type Name Description
number amount

_OnDetailChanged(Detail)

_OnDetailChanged(detail: Detail) -> nil
Type Name Description
Detail detail

_OnEntityHit(Entity,DamageCollider)

_OnEntityHit(target: Entity,source: DamageCollider) -> nil
Type Name Description
Entity target
DamageCollider source

Equip(ItemData,number)

Equip(item: ItemData,count: number = 1) -> nil
Type Name Description
ItemData item
number count

UnEquip(ItemData)

UnEquip(item: ItemData) -> nil
Type Name Description
ItemData item

AddItem(ItemData,number)

Adds the item to the

AddItem(item: ItemData,count: number = 1) -> nil
Type Name Description
ItemData item
number count

_Init(CreaturePrefab,boolean)

Invoked by spawners before _Ready is called

_Init(prefab: CreaturePrefab,randomize: boolean = True) -> nil
Type Name Description
CreaturePrefab prefab
boolean randomize When true, appearance will be randomized

State

State() -> T

Change(State)

Change(state: State) -> boolean
Type Name Description
State state

_OnTick(number)

The amount of expired ticks. Can be greater than 1 if the entity is going a lower detail level

_OnTick(tickDelta: number) -> nil
Type Name Description
number tickDelta

Save

Save() -> EntityData

Save(EntityData)

Save(data: EntityData) -> nil
Type Name Description
EntityData data

Load(EntityData)

Load(data: EntityData) -> nil
Type Name Description
EntityData data

AddExperience(SkillData,number)

AddExperience(skill: SkillData,amount: number) -> nil
Type Name Description
SkillData skill
number amount

GetKnowledge

GetKnowledge() -> T

TryGetKnowledge(T&)

TryGetKnowledge(knowledge: T&) -> boolean
Type Name Description
T& knowledge

Alternate

Alternate() -> IEntity

OnTaskUpdate

OnTaskUpdate() -> Task

Categories:

Updated: