A list of all Actions, Conditions and Expressions supported in this addon.
Configuration
-
Actions
Set max push per tick to {0} px
Set the maximum length of a single correction, in pixels. Set to 0 for no limit.
Set obstacles to {0}
Choose which objects count as walls: Custom uses the types added with Add solid, Solids uses every object with the built-in Solid behavior.
Set resolution mode to {0}
Set how the push-out correction is computed.
Set skin width to {0} px
Set the gap kept between this object and solids after a push, in pixels.
Set slide friction to {0}%
Set the fraction of along-surface speed lost per resolution, from 0 (frictionless) to 1 (full stop). Values are clamped to that range.
Set sliding enabled to {0}
Set whether the object slides along solid surfaces instead of stopping at them.
Set step distance to {0} px
Set the maximum distance moved per step, in pixels. Movement is broken into steps no larger than this. Set to 0 to disable stepping.
-
Expressions
ResolutionMode
The current resolution mode key (minimum_push, axis_x, axis_y or nearest_open).
Resolution
-
Actions
Eject to nearest open space within {0} px
Search outward for the closest position where this object overlaps no solid, up to the given radius in pixels, and move it there. Triggers On ejected on success or On eject failed otherwise.
Resolve now
Run one resolution immediately, regardless of Resolve on tick. Triggers On pushed out if a correction is applied, or On became trapped if the object cannot be freed.
Set enabled to {0}
Set whether the behavior resolves.
-
Conditions
Is enabled
True if the behavior is enabled.
Is overlapping a solid
True if this object currently overlaps at least one registered solid.
Is sliding
True if the last resolution preserved along-surface movement.
Is trapped
True if the last resolution left this object wedged against opposing solids.
On became trapped
Triggered when a resolution cannot free the object because it overlaps solids on opposing sides. OverlapCount reports how many solids it is wedged against.
On ejected
Triggered after Eject to nearest open space succeeds. LastPushX and LastPushY give the offset from the original to the ejected position.
On eject failed
Triggered when Eject to nearest open space finds no open position within the radius. The object is left at its original position.
On pushed out
Triggered after a resolution applies a non-zero correction. The LastPush, SurfaceNormal, Slide and OverlapCount expressions describe the correction just applied.
On step
Triggered for each step this object moves in, when stepping is enabled. Use it to make additional collision tests during fast movement. StepIndex and StepCount are available, and the object is at the current step's resolved position.
-
Expressions
LastPushDistance
The length of the last correction, in pixels. 0 if the last resolution moved nothing.
LastPushX
The X distance of the last correction, in pixels.
LastPushY
The Y distance of the last correction, in pixels.
OverlapCount
The number of distinct solids the object overlapped at the last resolution.
SlideDistance
The length of the along-surface movement preserved at the last resolution, in pixels.
SlideX
The X distance of the along-surface movement preserved at the last resolution, in pixels. 0 if no sliding occurred.
SlideY
The Y distance of the along-surface movement preserved, in pixels.
StepCount
The number of steps the object moves in during the current tick. 1 when stepping is disabled.
StepIndex
The index of the current step, starting at 0. Meaningful inside On step.
SurfaceNormalX
The X component of the unit surface normal the object was pushed off (the push-out direction). 0 if nothing moved.
SurfaceNormalY
The Y component of the unit surface normal. Use with SurfaceNormalX to detect which side a wall is on.
Solids
-
Actions
Add {0} as a solid
Add an object type as a solid for this object. Instances of that type will push this object out. Adding the same type twice has no effect.
Clear all solids
Remove all object types from this object's solid registry.
Remove {0} from solids
Stop treating an object type as a solid for this object.
-
Conditions
{0} is registered as a solid
True if the given object type is registered as a solid for this object.
-
Expressions
GetSolidByIndex
The name of the registered solid object type at the given 0-based index.
SolidCount
The number of object types currently registered as solids.