GXEntityApplyGravity - boxgaming/gx GitHub Wiki
Gets or sets the "apply gravity" mode of a specified entity.
Syntax
GXEntityApplyGravity entityId%, gravityFlag%
gravityFlag% = GXEntityApplyGravity(entityId%)
Description
When set to true the GX engine will apply the current gravity rules to the specified entity.
The entity is identified by the entityId% parameter. This id is returned by the GXEntityCreate function or can be looked up by the GX function.
Examples
Example1: Create an entity and tell GX to apply gravity.
DIM SHARED warhog AS LONG
warhog = GXEntityCreate("img/warhog.png", 16, 16, 5)
GXEntityApplyGravity warhog, GX_TRUE