Returns the x value of the specified instance. Used for referencing objects that you normally don’t have access to.
Argument | Type | Description |
---|---|---|
instance_id | :real | The ID of the instance to get the x value of |
Example, called from article1_update.gml:
// destroys the article when it’s within Clairen’s plasma field:
with (asset_get( "plasma_field_obj" )) {
with (other.id) {
if (point_distance(
x + 10 * spr_dir,
y,
get_instance_x( other ),
get_instance_y( other )
) < 180) {
instance_destroy();
}
}
}