Let's say, I have three objects: obj_square, obj_circle and obj_triangle.

Instances of all three types of objects exists in the room and call the same script: scr_test.

Inside of this script, how can I check instance of which object is calling it?


if(self is instanceof(obj_circle))
// do stuff

1 Answer 1



This read only variable returns the index of the object that the instance has been created from.

So your code would read:

if(object_index == obj_square) {
    // ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .