Objects
Object Manager
The Object Manager is a tool, which provides information about the objects that are currently on the map. This includes details such as their ID, position, and type.
The Object Manager may not be useful for most users, but it can be useful to gather information about items, since they include their owner's id, and other useful information.
To access the Object Manager, you can write the following code:
let ObjectManager = MooMoo.GameObjectManager;
// get a game object by its sid
let gameObject = ObjectManager.getObjectById(id);
// get all game objects placed by a player
let objects = ObjectManager.getObjectsByOwnerSid(ownerSid);
Now, the gameObject
variable would be returning a GameObject
object, which contains information about the object, such as its id, position, and type.
The objects
variable would be returning an array of GameObject
objects, which contain information about the objects, such as their id, position, and type.