Game Play :: Instances

deceleration_distance(speed,friction)
Returns the distance travelled by an object moving at a given speed and with a given rate of deceleration.
instance_closest_approach(inst[,time])
Returns the distance in pixels (or time in steps) until the calling and given instances are at their nearest separation based on their current positions and speeds.
instance_find_enemy(object)
Returns the nearest instance of an object whose local variable "team" has a different value than the calling instance, or noone if no instance is found.
instance_find_friend(object)
Returns the nearest instance of an object whose local variable "team" has the same value as calling instance, or noone if no instance is found.
instance_find_team(object,team)
Returns the nearest instance of an object whose local variable "team" has the same value as a given team, or noone if no instance is found.
instance_nearest_notme(x,y,obj)
Returns the nearest instance to a given point, disregarding the calling instance.
instance_nth_farthest(x,y,obj,n)
Returns the id of the nth farthest instance of an object from a given point or noone if none is found.
instance_nth_nearest(x,y,obj,n)
Returns the id of the nth nearest instance of an object to a given point or noone if none is found.
instance_singleton(object)
Returns a single instance of the given object, creating one if no instance exists.