YYC Toolbox Lua API Help

ObjectInstance

This class is a simple wrapper for object instances.

You can set any field of this class to an RValue, and it'll be the same as setting a variable.

Example

local engine = API.GetEngine() local object = engine:GetObjectByName("obj_player") local instance = object:GetInstances()[1] print(instance.x, instance.y) -- Prints x and y instance.x = 0 -- Set x to 0 instance.y = 0 -- Set y to 0 print(instance.x, instance.y) -- Prints 0 0 -- You can set any variable you wish.
Last modified: 29 March 2025