LiveObject Class

Inherits: ResourceStorage

Properties
age animationDie animationFinish carryingCapacity childbearing childbearingChance childbearingTimer deadAge dieingTask dir disease diseaseImmunity diseased frozen happiness happinessMax happinessScale health healthMax heat heatMax heatNormal height house hungry inside insideBuilding male meshPos modelsCount name pos pos3D radius reserved resourceInStorage resourcesWeight satiety satietyCoefficient satietyMax skeleton skeletonName speedWalk sphereCenter sphereRadius storageEmpty survivalMode tasksCount textHint thirst type userControl velocity visible waterSatiety waterSatietyMax

Functions
addBuff addScriptTask addTaskAddResourceToBuilding addTaskBuildResourceReservation addTaskCallEvent addTaskConstruct addTaskCreateResource addTaskDepositInventory addTaskDie addTaskEnter addTaskExit addTaskFollow addTaskHeating addTaskMineResource addTaskPickResource addTaskPlayAnimation addTaskPlayAnimationOnce addTaskRemoveResourceFromBuilding addTaskRepair addTaskReserveLiveObject addTaskReservePlantCell addTaskResetHint addTaskRetrieveFromStorage addTaskRotate addTaskScript addTaskSetHint addTaskStand addTaskWait addTaskWalkTo addTaskWalkToLiveObject addTaskWork attachModel canDeposit canDepositResource canWalk canWalkToBuilding canWalkToPivot canWalkToPoint canWalkToPointWithRadius changePrefab clearAllTasks clearStorage damage deposit depositResource dropHouse eat exitBuilding findRandomWalkPos getResourceCount getWork goTo goToBuilding goToBuildingOptimized goToBuildingOptimizedWithAnimation goToBuildingWithAnimation goToPivot goToPivotWithAnimation goToResourceSource goToWithAnimation haveBuff haveImportantTask haveTasks initDieStatus isInsideBuilding onNewAge playAnim playAnimOnce playSound rand randReset removeAllModels removeModel reserve resetHouse resetTextHint retrieve retrieveResource rotateTo setInsideHouse setResourceCount teleportTo unreserve updateChildbearingTimer

.age
Type: number

.animationDie
Type: string [Read Only]

.animationFinish
Type: boolean [Read Only]

.carryingCapacity
Type: number [Read Only]

.childbearing
Type: boolean [Read Only]

.childbearingChance
Type: number

.childbearingTimer
Type: number

.deadAge
Type: number [Read Only]

.dieingTask
Type: boolean [Read Only]

.dir
Type: Vector2

.disease
Type: DiseaseConfig

.diseaseImmunity
Type: boolean [Read Only]

.diseased
Type: boolean [Read Only]

.frozen
Type: boolean [Read Only]

.happiness
Type: number [Read Only]

.happinessMax
Type: number [Read Only]

.happinessScale
Type: number [Read Only]

.health
Type: number

.healthMax
Type: number [Read Only]

.heat
Type: number

.heatMax
Type: number [Read Only]

.heatNormal
Type: number [Read Only]

.height
Type: number [Read Only]

.house
Type: Building

.hungry
Type: boolean [Read Only]

.inside
Type: boolean [Read Only]

.insideBuilding
Type: Building [Read Only]

.male
Type: boolean [Read Only]

.meshPos
Type: Vector2 [Read Only]

.modelsCount
Type: number [Read Only]

.name
Type: string

.pos
Type: Vector2 [Read Only]

.pos3D
Type: Vector2 [Read Only]

.radius
Type: number [Read Only]

.reserved
Type: boolean [Read Only]

.resourceInStorage
Type: string [Read Only]

.resourcesWeight
Type: number [Read Only]

.satiety
Type: number

.satietyCoefficient
Type: number [Read Only]

.satietyMax
Type: number [Read Only]

.skeleton
Type: SkeletalCharactergetSkeleton_lua@

.skeletonName
Type: string [Read Only]

.speedWalk
Type: number [Read Only]

.sphereCenter
Type: Vector2 [Read Only]

.sphereRadius
Type: number [Read Only]

.storageEmpty
Type: boolean [Read Only]

.survivalMode
Type: boolean

.tasksCount
Type: number [Read Only]

.textHint
Type: string

.thirst
Type: boolean [Read Only]

.type
Type: number [Read Only]

.userControl
Type: boolean [Read Only]

.velocity
Type: Vector2 [Read Only]

.visible
Type: boolean

.waterSatiety
Type: number

.waterSatietyMax
Type: number [Read Only]

addBuff
function addBuff(name string )

addScriptTask
function addScriptTask(task TaskScript )

addTaskAddResourceToBuilding
function addTaskAddResourceToBuilding(b Building, strType string , count number )

addTaskBuildResourceReservation
function addTaskBuildResourceReservation(b Building, res string , count number )

addTaskCallEvent
function addTaskCallEvent(b Building, s string , p1 number , p2 number )

addTaskConstruct
function addTaskConstruct(b Building, time number )

addTaskCreateResource
function addTaskCreateResource(resType string )

addTaskDepositInventory
function addTaskDepositInventory(b Building, resType string , count number )

addTaskDie
function addTaskDie(logText string, animationName string )

addTaskEnter
function addTaskEnter(b Building )

addTaskExit
function addTaskExit

addTaskFollow
function addTaskFollow(animation string )

addTaskHeating
function addTaskHeating(b Building )

addTaskMineResource
function addTaskMineResource(s GameResourceSource, building Building )

addTaskPickResource
function addTaskPickResource(s GameResourceSource )

addTaskPlayAnimation
function addTaskPlayAnimation(animationName string, fromStart boolean )

addTaskPlayAnimationOnce
function addTaskPlayAnimationOnce(animationName string, sound string )

addTaskRemoveResourceFromBuilding
function addTaskRemoveResourceFromBuilding(b Building, strType string , count number )

addTaskRepair
function addTaskRepair(b Building, time number )

addTaskReserveLiveObject
function addTaskReserveLiveObject(liveObject LiveObject, reserve boolean )

addTaskReservePlantCell
function addTaskReservePlantCell(b Building, cellNum number , bAddReserve boolean )

addTaskResetHint
function addTaskResetHint

addTaskRetrieveFromStorage
function addTaskRetrieveFromStorage(uid UID, resType string , count number )

addTaskRotate
function addTaskRotate(dir Vector2 )

addTaskScript
function addTaskScript(name, data)

addTaskSetHint
function addTaskSetHint(hint string )

addTaskStand
function addTaskStand(time number )

addTaskWait
function addTaskWait(time number )

addTaskWalkTo
function addTaskWalkTo(pos Vector2, animation string , finishRadius number , maxDistToEnd number )

addTaskWalkToLiveObject
function addTaskWalkToLiveObject(obj LiveObject, animation string , workRadiusCorrect boolean )

addTaskWork
function addTaskWork(time number, animation string , sound string )

attachModel
function attachModel(name string, pathToPrefab string )

canDeposit
function canDeposit(resources table ) -> boolean

canDepositResource
function canDepositResource(type string, count number ) -> boolean

canWalk
function canWalk(toPos Vector2, maxDistToEndPoint number ) -> boolean

canWalkToBuilding
function canWalkToBuilding(b)

canWalkToPivot
function canWalkToPivot(pos)

canWalkToPoint
function canWalkToPoint(pos)

canWalkToPointWithRadius
function canWalkToPointWithRadius(pos, r)

changePrefab
function changePrefab(prefab string )

clearAllTasks
function clearAllTasks

clearStorage
function clearStorage

damage
function damage(damageValue number, attackerUID UID , buildingUID UID )

deposit
function deposit(resources table ) -> boolean

depositResource
function depositResource(type string, count number ) -> boolean

dropHouse
function dropHouse

eat
function eat(satiety number, foodType string )

exitBuilding
function exitBuilding

findRandomWalkPos
function findRandomWalkPos(r number, minLen number , maxLen number ) -> Vector2

getResourceCount
function getResourceCount(type string ) -> number

getWork
function getWork(dt number ) -> number

goTo
function goTo(pos)

goToBuilding
function goToBuilding(b)

goToBuildingOptimized
function goToBuildingOptimized(b)

goToBuildingOptimizedWithAnimation
function goToBuildingOptimizedWithAnimation(b, animation)

goToBuildingWithAnimation
function goToBuildingWithAnimation(b, animation)

goToPivot
function goToPivot(pos)

goToPivotWithAnimation
function goToPivotWithAnimation(pos, animation)

goToResourceSource
function goToResourceSource(pos, animation)

goToWithAnimation
function goToWithAnimation(pos, animation)

haveBuff
function haveBuff(name string ) -> boolean

haveImportantTask
function haveImportantTask -> boolean

haveTasks
function haveTasks -> boolean

initDieStatus
function initDieStatus

isInsideBuilding
function isInsideBuilding(bld Building ) -> boolean

onNewAge
function onNewAge

playAnim
function playAnim(animName string, fromStart boolean )

playAnimOnce
function playAnimOnce(animName string )

playSound
function playSound(pathToFile string )

rand
function rand(min number, max number ) -> number

randReset
function randReset

removeAllModels
function removeAllModels

removeModel
function removeModel(name string )

reserve
function reserve -> boolean

resetHouse
function resetHouse

resetTextHint
function resetTextHint

retrieve
function retrieve(resources table ) -> boolean

retrieveResource
function retrieveResource(type string, count number ) -> boolean

rotateTo
function rotateTo(toDir Vector2, dt number ) -> boolean

setInsideHouse
function setInsideHouse(uid UID )

setResourceCount
function setResourceCount(type string, count number )

teleportTo
function teleportTo(pos Vector2 )

unreserve
function unreserve -> boolean

updateChildbearingTimer
function updateChildbearingTimer(dt number )