GameMaker: Studio gives you a number of functions that
permit you to get various details about an object. Note, an object
is not an instance (an in-game entity), it is purely a
resource from which all instances are created. This means that the
return values of these functions may be different to the actual
values shown by instances in the room, as once an instance is
created it can be changed through code and D'n'D actions.
There are also a number of functions that permit you set the properties for an object. It should be noted that any instances of this object that already exist in the room may not be affected by these functions, but all new instances of this object created in the room will be, so it is recommend that you never change an objects properties when instances of that object are present in the current room.
Finally, you can also use certain functions to generate events from code within a specific instance or object. These functions can be very useful, especially when dealing with Parents and Children, and are outlined in the following section:
- Generating Events