Object Functions

From Danmakufu Wiki
Jump to: navigation, search

Obj_Delete

Arguments:
 1) object ID (real)

Deletes specified object.

Obj_IsDeleted

Arguments:
 1) object ID (real)

Returns: bool

Returns true if the specified object has been deleted.

Obj_SetVisible

Arguments:
 1) object ID (real)
 2) visible (bool)

Sets visibility of specified object.
If visible is set to false, the object will not be drawn.

Obj_IsVisible

Arguments:
 1) object ID (real)

Returns: bool

Returns true if the specified object is visible.

Obj_SetRenderPriority

Arguments:
 1) object ID (real)
 2) render priority (real)

Sets the object's render priority as a ratio (0.0-1.0).

Obj_SetRenderPriorityI

Arguments:
 1) object ID (real)
 2) render priority (real)

Sets the object's render priority in the range 0-100 (integer).

Obj_GetRenderPriority

Arguments:
 1) object ID (real)

Returns the object's render priority as a ratio (0.0-1.0).

Obj_GetRenderPriorityI

Arguments:
 1) object ID (real)

Returns the object's render priority as an integer (0-100).

Obj_GetValue

Arguments:
 1) object ID (real)
 2) key (char)

Returns the value associated with the given key for the given object, previously set by Obj_SetValue.
Warning: If the key-value pair does not exist or was deleted, attempting to access it will crash the program.

Obj_GetValueD

Arguments:
 1) object ID (real)
 2) key (char)
 3) default value (arbitrary type)

Returns the value associated with the given key for the given object, previously set by Obj_SetValue.
If the key-value pair doesn't exist, the default value is returned instead.

Obj_SetValue

Arguments:
 1) object ID (real)
 2) key (char)
 3) value (arbitrary type)

For the given object, maps the given key to the given value.
The value can be returned by using Obj_GetValue with the corresponding key.

Obj_DeleteValue

Arguments:
 1) object ID (real)
 2) key (char)

Deletes the key-value pair previously set by Obj_SetValue.

Obj_IsValueExists

Arguments:
 1) object ID (real)
 2) key (char)

Checks whether the object has a key-value pair for the given key and returns true if it does.

Obj_GetType

Arguments:
 1) object ID (real)

Returns: object type (real)

Retrieves the type of object. Refer to this for the list of possible return values.