object_get_physics

Returns whether an object is flagged as physics enabled or not.

Syntax:

object_get_physics(obj);


Argument Description
obj The index of the object to check.


Returns: Boolean


Description

This function will tell you whether the object you are checking has been flagged as "physics enabled", returning true, or not, returning false.


Example:

if object_get_physics(object_index)    {    phy_active = true;    }

The above code will check the instance running it to see if the object it is created from is physics enabled, and if it is it activates the physics simulation for the instance.


Back: Objects
Next: object_is_ancestor
© Copyright YoYo Games Ltd. 2018 All Rights Reserved