Move the instance in a given direction up to a maximum until it is no longer in contact with any other instance. Move the instance in a given direction up to a maximum until it comes into contact with a solid object. Move the instance in a given direction up to a maximum until it comes into contact with any other instance. A collision event limits to the instances in the collision. In a step event will bounce off solid objects. When used in a collision event it is limited to the collision instances. In a step event will bounce this instance off of all other objects. Refer to the help file for more detail and function parameters. Instance movement functions distance_to_object distance_to_point motion_add Instance collision functions collision_circle collision_ellipse collision_line collision_point collision_rectangle instance_place Gets the y position of the instance when it was first created. Gets the previous y position of the instance. Gets the x position of the instance when it was first created. Gets the previous x position of the instance.
#GAME MAKER STUDIO 2 REFERENCE UPDATE#
Applied to the instances direction, changing speed and direction will update hspeed and vspeed. Get or set the instances horizontal speed. A value greater than zero will reduce the speed over time. Get or set the direction of the instance. Vspeed x xprevious xstart y yprevious ystart Move_random move_snap move_towards_point move_wrap Gets the total number of active instances of a given object. Gets Id of instance nearest to a specified position. An array of active instance Id’s in current room. Gets Id of instance furthest from a specified position. Gets instance Id of (n)th instance of an object. Destroys this instance, removing it from the current room. Change this instance into another instance Create a copy of this instance. Deactivate instances inside or outside of a region in the current room. Deactivate instances of specified object(s). Deactivate all instances in current room. Gets the total number of active instances.
Activate instances inside or outside of a region in the current room. Activates instances of specified object(s). Instance functions instance_activate_all instance_activate_object instance_activate_region instance_count instance_deactivate_all instance_deactivate_object instance_deativate_region instance_change instance_copy instance_create instance_destroy instance_exists instance_find instance_furthest instance_id instance_nearest instance_numberĪctivate all instances in the current room. Get or set the instances visibility.įeedback or report errors: motion_set move_bounce_all Gets the current vertical position of the sprites origin or hotspot. Gets the current horizontal position of the sprites origin or hotspot. See sprite_get_height for original width. Solid instances cause a special collision. Get or set the solid flag of the instance. True means the instance will not be destroyed when changing rooms. Get or set the persistent state of the instance. Can set to another sprite, eg: spr_sprite2 Get the unique object identifier. Get or set the sprite index used for the collision mask. Get or set the vertical scale of the sprite. 1 = original size, 0.5 = half, 2.0 = double size. Get or set the horizontal scale of the sprite. Get or set the animation playback speed for the sub-images. Get or set the current sub-image displayed. Gets the number of sub-images defined in the current sprite.
Get or set the blending colour used to display the instance. Gets the instance unique identifier value Get or set the semi-transparency of the sprite. 0 = default layer, +ve behind, -ve infornt. Determines what layer the sprite will be displayed on. Gets the position of the top-most point of the instance in the room. Gets the position of the right-most point of the instance in the room. Gets the position of the left-most point of the instance in the room. Gets the position of the bottom-most point of the instance in the room. Up to twelve alarms can be set per instance and they count down to zero with each game step. Image_number image_index image_speed image_xscale
Game Maker GML Quick Reference Sheet -:- ībox_bottom bbox_left bbox_right bbox_top depth