Behaviors

The catalogue of behaviors in rmp::behavior: what each one does to the object that has it.

NameWhat it is
rmp::behavior::AnimatorPlays the tag that fits what the object is doing: die once its Health is dead, hurt while it is invulnerable after a hit, jump and fall in the air (with gravity), run while it moves and idle while it does not โ€” and mirrors it with flip_x by the way it moves.
rmp::behavior::AreaA region that says who comes and goes: a trigger, a door's sensor, a pit, a shop's counter.
rmp::behavior::BallBounces, keeps its pace, and leaves a paddle at an angle that depends on where it hit.
rmp::behavior::ChaseSees a target and goes after it.
rmp::behavior::CollectibleA coin, a key, a heart.
rmp::behavior::DraggablePicked up with the pointer and put down somewhere.
rmp::behavior::FollowChases a handle, with a speed and a distance it stops at.
rmp::behavior::GridSnapSquares the position with a grid, AFTER everything that moves it.
rmp::behavior::HealthHit points, a window of invulnerability with a blink, and death.
rmp::behavior::HitboxWhat hurts: a sword's swing, a spike, a bullet, an explosion.
rmp::behavior::LifespanDiscarded after N seconds.
rmp::behavior::OrbitCircles a handle or a point: a shield of blades, a moon, a fairy.
rmp::behavior::ParallaxA background layer that scrolls at its own factor and repeats itself with no seam.
rmp::behavior::PathfindWalks to a target, or to a point, around the map's walls: rmp::find_path(), asked again every repath_every seconds, and followed at speed.
rmp::behavior::PatrolGoes from waypoint to waypoint โ€” round in a loop, or back and forth with ping_pong โ€” waiting wait seconds at each.
rmp::behavior::PlatformerGravity, jumping, ground, coyote time and a buffered jump.
rmp::behavior::ProjectileTravels the way you pushed it and is discarded when it leaves or hits.
rmp::behavior::RunnerConstant forward motion that SPEEDS UP over time, with a jump and a duck.
rmp::behavior::ShooterFires.
rmp::behavior::SpawnerProduces objects every N seconds, or every N units TRAVELLED.
rmp::behavior::StateMachineNamed states and the moves between them: an enemy that idles, patrols, chases and flees; a boss's phases.
rmp::behavior::TalkerSomeone to talk to.
rmp::behavior::TimerCalls you every N seconds.
rmp::behavior::TopDownEight directions, and the sprite chosen from the one you are facing.
rmp::behavior::TweenMoves one property of its object from from to to over seconds, along an Ease.