|obj||The index of the object to check|
This function will get you the object_index of any parent that
has been assigned to the specified object, or else return -100 to
show that the object has no parent assigned to it, or -1 if the
object being checked does not exist. For more information on
parents see the section More
About Objects: Parents.
par = object_get_parent(object_index);
The above code will get the parent of the object index for the instance running the code and store the return value in the variable "par".