sm64coopdx/docs/lua/functions-7.md
PeachyPeach d9f5869fcd
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
Fix Texture type; add various get_name functions (#945)
2025-09-15 20:59:26 +02:00

2.9 KiB

Lua Functions


< prev | 1 | 2 | 3 | 4 | 5 | 6 | 7]


functions from surface_load.h


load_object_collision_model

Description

Loads the object's collision data into dynamic collision. You must run this every frame in your object's behavior loop for it to have collision

Lua Example

load_object_collision_model()

Parameters

  • None

Returns

  • None

C Prototype

void load_object_collision_model(void);

🔼


obj_get_surface_from_index

Description

Gets a surface corresponding to index from the surface pool buffer

Lua Example

local SurfaceValue = obj_get_surface_from_index(o, index)

Parameters

Field Type
o Object
index integer

Returns

Surface

C Prototype

struct Surface *obj_get_surface_from_index(struct Object *o, u32 index);

🔼


surface_has_force

Description

Checks if a surface has force

Lua Example

local booleanValue = surface_has_force(surfaceType)

Parameters

Field Type
surfaceType integer

Returns

  • boolean

C Prototype

bool surface_has_force(s16 surfaceType);

🔼



functions from sync_object.h


sync_object_get_object

Description

Retrieves an object from a sync ID

Lua Example

local ObjectValue = sync_object_get_object(syncId)

Parameters

Field Type
syncId integer

Returns

Object

C Prototype

struct Object* sync_object_get_object(u32 syncId);

🔼


sync_object_is_initialized

Description

Checks if a sync object is initialized using a syncId

Lua Example

local booleanValue = sync_object_is_initialized(syncId)

Parameters

Field Type
syncId integer

Returns

  • boolean

C Prototype

bool sync_object_is_initialized(u32 syncId);

🔼


sync_object_is_owned_locally

Description

Checks if a sync object is owned locally using a syncId

Lua Example

local booleanValue = sync_object_is_owned_locally(syncId)

Parameters

Field Type
syncId integer

Returns

  • boolean

C Prototype

bool sync_object_is_owned_locally(u32 syncId);

🔼



< prev | 1 | 2 | 3 | 4 | 5 | 6 | 7]