A dynamic instance is one that is fully simulated within the physics world and this read-only variable will return true if the instance being checked is fully simulated or false if it is not.
phy_dynamic;
Boolean (or undefined if the instance is not physics enabled)
if other.phy_dynamic
{
with (other)
{
var _dir;
_dir = point_direction(x, y, other.x, other.y);
physics_apply_impulse(x, y, x + lengthdir_x(100, dir), y + lengthdir_y(100, dir));
}
}
The above code checks if the other instance is a dynamic physics instance. If it is, some code is executed in this other instance: the direction between the two instances is calculated using point_direction and an impulse of 100 is applied to the other instance using physics_apply_impulse.