Methods
-
body_set_size(object, width, height)
-
Sets the width and height of the physics body for an object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the body of
widthNumber width to set the body to
heightNumber height to set the body to
Code Equivalent:
object.body.setSize(width, height); -
body_set_size(object, width, height, offset_x, offset_y)
-
Sets the width and height of the physics body for an object, with an offset position. Offset is based on the anchor of the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the body of
widthNumber width to set the body to
heightNumber height to set the body to
offset_xNumber the amount to move the physics body by in the x direction, based on the object's position and anchor
offset_yNumber the amount to move the physics body by in the y direction, based on the object's position and anchor
Code Equivalent:
object.body.setSize(width, height); -
debug_body(object)
-
Renders a visual for the physics body of the object. Will appear as a semi transparent filled green rectangle.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to render the body for
Code Equivalent:
game.debug.body(object); -
get_body_boolean_field(element, object)
-
Returns the chosen boolean field value of the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description elementthe value to get
objectobject to get values from
Code Equivalent:
object.body.element -
get_body_field_point_class(field, object)
-
Returns the chosen point field value of the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description fieldthe field to get the value of
objectobject to get values from
Code Equivalent:
object.body.field -
get_body_numeric_field(element, object)
-
Returns the chosen numeric field value of the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description elementthe value to get
objectobject to get values from
Code Equivalent:
object.body.element -
set_body_boolean_field(field, object, boolean)
-
Assigns the chosen boolean field for the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description fieldthe field to set
objectobject to assign values for
booleanvalue to set the field to
Code Equivalent:
object.body.element = value; -
set_body_field_point(field, value)
-
Parameters:
Name Type Description fieldthe field to set
valuevalue to set the field to
Code Equivalent:
object.body.field.element = value; -
set_body_field_point(field, element, value)
-
Assigns the chosen point field element for the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description fieldthe field to set
elementchoose to assign the x or y element of the point
valuevalue to set the field to
Code Equivalent:
object.body.field.element = value; -
set_body_field_point_class(field, object, point)
-
Assigns the chosen point field for the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description fieldthe field to set
objectobject to assign values for
pointpoint to set the field to
Code Equivalent:
object.body.field = point; -
set_body_numeric_field(element, object, value)
-
Assigns the chosen numeric field for the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description elementthe value to set
objectobject to assign values for
valuevalue to set the field to
Code Equivalent:
object.body.element = value; -
stop_body(object)
-
Sets the object's acceleration, velocity, and speed to 0.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set values for
Code Equivalent:
object.body.stop();