ClientObject

Group
player
Methods
6
Fields
None

Getting one

client:createClientObject()

Methods

MethodReturnsDescription
setActive(boolean)()Spawn it (true: drawn from the next frame, in its world view) or despawn it. An object left inactive is kept until its plugin leaves 4096…
isActive()booleanWhether it is spawned. An animation that ends with setShouldLoop(false) despawns it.
setLocation(LocalPoint, number)()Place it at point on level, at the ground's height there (Perspective.getTileHeight); a point in another world view moves it there. R…
setAnimation(Animation?)()Pose its model with animation from frame 0, looping when it ends (or despawning, after setShouldLoop(false)); nil for a static model.
setShouldLoop(boolean)()Whether its animation loops (true) or despawns it when it ends (false).
setModel(Model?)()The model to draw, nil for none. It must be one the client loaded (client:loadModel, ModelData:light), named by its content; a model…

Returned by

MethodReturnsDescription
Client.createClientObjectClientObjectA new client-side scene entity of this plugin, inactive, a ClientObject Drawn by the client's own scene in SD, and by its HD renderer in…

Method details

setActive

setActive: (ClientObject, boolean) -> ()

Spawn it (true: drawn from the next frame, in its world view) or despawn it. An object left inactive is kept until its plugin leaves 4096 newer ones inactive; then using it raises.

isActive

isActive: (ClientObject) -> boolean

Whether it is spawned. An animation that ends with setShouldLoop(false) despawns it.

setLocation

setLocation: (ClientObject, LocalPoint, number) -> ()

Place it at point on level, at the ground's height there (Perspective.getTileHeight); a point in another world view moves it there. Raises for a level outside 0-3.

setAnimation

setAnimation: (ClientObject, Animation?) -> ()

Pose its model with animation from frame 0, looping when it ends (or despawning, after setShouldLoop(false)); nil for a static model.

setShouldLoop

setShouldLoop: (ClientObject, boolean) -> ()

Whether its animation loops (true) or despawns it when it ends (false).

setModel

setModel: (ClientObject, Model?) -> ()

The model to draw, nil for none. It must be one the client loaded (client:loadModel, ModelData:light), named by its content; a model copied out of the scene (an actor's, a loc's) raises.