Skip to content

instance_destroy

CryoEagle edited this page Jan 5, 2019 · 1 revision

instance_destroy

Destroys selected object

Syntax:

instance_destroy(go)
Argument Description
GameObject go GameObject to be destroyed

Returns: N/A

Description:

This function will delete your selected object.

Example:

if (mouse_check_button_pressed(MouseButtons.mb_right))
{
    instance_destroy(this);
}

This code will delete GameObject with this code.

Back to Instances

Clone this wiki locally