Addon ID

  • salmanshh_pushoutsolid

Info

Statistics

  • Download count38 total downloads
  • Latest download count 14 downloads of latest version
  • Average download count1 downloads per day average

Owners

A list of all Actions, Conditions and Expressions supported in this addon.

Configuration

  • Actions

    {my} Set axis resolution to {0}

    Choose how overlaps are cleared. Minimum pushes along the single shortest direction (best for top-down). Separate clears the gravity axis before the cross axis, the stable land-then-touch-wall behaviour platformers expect.

    {my} Set max floor slope to {0} degrees

    Set the steepest surface, in degrees from flat, still counted as a floor (or ceiling) rather than a wall. Also limits how far a jump-thru can tilt and still catch a landing. Clamped to 0-90.

    {my} Set jump-thru source to {0}

    Choose where one-way platforms come from. None disables them. Jump-thru behavior uses every object with the built-in Jump-thru behavior. Custom uses the types added with Add jump-thru.

    {my} Set max push per tick to {0} px

    Set the maximum length of a single correction, in pixels. Set to 0 for no limit.

    {my} Set movement style to {0}

    Choose whether contacts are labelled. Top-down treats every surface the same; Side-scrolling classifies each contact against the Up direction into floor, wall or ceiling.

    {my} 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.

    {my} Set resolution mode to {0}

    Set how the push-out correction is computed.

    {my} Set skin width to {0} px

    Set the gap kept between this object and solids after a push, in pixels.

    {my} 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.

    {my} Set sliding enabled to {0}

    Set whether the object slides along solid surfaces instead of stopping at them.

    {my} 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.

    {my} Set up direction to {0}

    Set which screen direction points away from gravity. Used in Side-scrolling style to tell a floor from a ceiling and to land objects on jump-thru platforms.

  • Expressions

    MovementStyle

    The current movement style key (top_down or side_scroller).

    ResolutionMode

    The current resolution mode key (minimum_push, axis_x, axis_y, nearest_open or swept).

Jump-thru

  • Actions

    {my} Add {0} as a jump-thru

    Add an object type as a one-way platform for this object (used when Jump-thru source is Custom). The object can stand on instances of that type from above but pass through from below or the side.

    {my} Clear all jump-thrus

    Remove all object types from this object's jump-thru registry.

    {my} Remove {0} from jump-thrus

    Stop treating an object type as a one-way platform for this object.

  • Conditions

    {my} {0} is registered as a jump-thru

    True if the given object type is registered as a one-way platform for this object.

  • Expressions

    GetJumpthruByIndex

    The name of the registered jump-thru object type at the given 0-based index.

    JumpthruCount

    The number of object types currently registered as jump-thrus.

Resolution

  • Actions

    {my} 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.

    {my} Set enabled to {0}

    Set whether the behavior resolves.

    {my} Set resolve on tick to {0}

    Set whether the object is corrected automatically every tick after movement. Turn it off to push out only when you call the Resolve now action (for example for detection-only or discrete corrections).

  • Conditions

    {my} Is enabled

    True if the behavior is enabled.

    {my} Is overlapping a solid

    True if this object currently overlaps at least one registered solid.

    {my} Is sliding

    True if the last resolution preserved along-surface movement.

    {my} Is trapped

    True if the last resolution left this object wedged against opposing solids.

    {my} 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.

    {my} On ejected

    Triggered after Eject to nearest open space succeeds. LastPushX and LastPushY give the offset from the original to the ejected position.

    {my} 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.

    {my} On pushed out

    Triggered after a resolution applies a non-zero correction. The LastPush, SurfaceNormal, Slide and OverlapCount expressions describe the correction just applied.

    {my} 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

    {my} 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.

    {my} Clear all solids

    Remove all object types from this object's solid registry.

    {my} Remove {0} from solids

    Stop treating an object type as a solid for this object.

  • Conditions

    {my} {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.

Surfaces

  • Conditions

    {my} Is on ceiling

    True if the last resolution pushed the object off a ceiling (a surface facing against the Up direction). Only meaningful in Side-scrolling movement style.

    {my} Is on floor

    True if the last resolution pushed the object off a floor (a surface facing the Up direction). Only meaningful in Side-scrolling movement style.

    {my} Is on slope

    True if the object is on a floor that is tilted (not level) - i.e. on floor with a non-zero slope angle. Only meaningful in Side-scrolling movement style.

    {my} Is on wall

    True if the last resolution pushed the object off a wall (a surface too steep to be a floor or ceiling). Only meaningful in Side-scrolling movement style.

    {my} On hit ceiling

    Triggered on the resolution where the object first gains a ceiling contact (it bumped its head). Side-scrolling movement style only.

    {my} On hit wall

    Triggered on the resolution where the object first gains a wall contact. Read WallSide for which side the wall is on. Side-scrolling movement style only.

    {my} On landed

    Triggered on the resolution where the object first gains a floor contact (it landed). Side-scrolling movement style only.

    {my} On left floor

    Triggered on the resolution where the object loses its floor contact (it walked off an edge or was lifted away). Side-scrolling movement style only.

  • Expressions

    FloorNormalX

    The X component of the unit normal of the last floor contact (points away from the floor). 0 if no floor has been contacted.

    FloorNormalY

    The Y component of the unit normal of the last floor contact (points away from the floor). 0 if no floor has been contacted.

    SlopeAngle

    The signed angle of the current floor relative to level, in degrees. 0 on flat ground; positive when the floor tilts down toward the object's right. Meaningful while Is on floor is true.

    TicksSinceFloor

    How many resolutions have passed since the object was last on a floor. 0 while on the floor; grows once it leaves. Use it for coyote time (allow a jump for a few ticks after leaving a ledge). Only updates while Resolve on tick is on.

    WallSide

    Which side a contacted wall is on, relative to the Up direction: -1 wall on the object's left, +1 wall on its right, 0 if not on a wall.