Skip to content

instance_number

CryoEagle edited this page Jan 5, 2019 · 1 revision

instance_number

Return how many of selected object is in room

Syntax:

instance_number(obj)
Argument Description
Type obj Object to count how many

Returns: int

Description:

Return how many of selected object is in room, for example someone who will play your game can see how many coins are still in level.

Example:

int instancesInGame = instance_number(typeof(oYourObject));

This code will save to variable int instancesInGame how many of oYourObject are in the room.

Back to Instances

Clone this wiki locally