Object||doc135316

September 20, 2022

Object

This abstract class object cannot be created

Introduction

Object is the abstract base class of all Class templates. Object Class templates include Entity, DropItem, Missile, etc. Click here to see the introduction to templates for details. Object contains basic information on configuration, ID, type, etc.

Properties

int objID

Object ID

int ownerId

owner object id

boolean isMainPlayer

Determine whether the object is the main player of the client

boolean isEntity

Determine whether an object is an entity object

boolean isPlayer

Determine if the object is a player

Map map

Current object location map

Function

config cfg (  )

Get object configuration information

variant data (  string key  )

get some data

void setData (  string key,  variant val  )

set some data

function timer (  int time,  function function,  args …  )

Starts a timer and returns a function that stops the timer

function lightTimer (  string stack,  int time,  function func,  any …  )

Start a timer with custom error output content and return a function to stop the timer

float distance (  Object obj  )

Returns the distance to the target object

boolean isValid (  )

Determine if you are still a valid object

boolean setMap (  Map map  )

Move the object to the specified map

void setRotationYaw (  float yaw  )

Set the orientation of the object's yaw axis

void setRotationPitch (  float pitch  )

Set the pitch axis rotation angle

float getRotationYaw (  )

Get the current yaw angle value

float getRotationPitch (  )

Get the current pitch angle value

Vector3 getPosition (  )

Get current location coordinates

void setPosition (  Vector3 pos  )

Set object to position coordinates

void delayCall (  function func,  int time  )

Delay calling function

void destroy (  )

destroy object

void setBoundingVolume  (  table boxTable )

Set object collision box