Behaviors
The catalogue of behaviors in rmp::behavior: what each one does to the object that has it.
| Name | What it is |
|---|---|
rmp::behavior::Animator | Plays 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::Area | A region that says who comes and goes: a trigger, a door's sensor, a pit, a shop's counter. |
rmp::behavior::Ball | Bounces, keeps its pace, and leaves a paddle at an angle that depends on where it hit. |
rmp::behavior::Chase | Sees a target and goes after it. |
rmp::behavior::Collectible | A coin, a key, a heart. |
rmp::behavior::Draggable | Picked up with the pointer and put down somewhere. |
rmp::behavior::Follow | Chases a handle, with a speed and a distance it stops at. |
rmp::behavior::GridSnap | Squares the position with a grid, AFTER everything that moves it. |
rmp::behavior::Health | Hit points, a window of invulnerability with a blink, and death. |
rmp::behavior::Hitbox | What hurts: a sword's swing, a spike, a bullet, an explosion. |
rmp::behavior::Lifespan | Discarded after N seconds. |
rmp::behavior::Orbit | Circles a handle or a point: a shield of blades, a moon, a fairy. |
rmp::behavior::Parallax | A background layer that scrolls at its own factor and repeats itself with no seam. |
rmp::behavior::Pathfind | Walks 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::Patrol | Goes from waypoint to waypoint โ round in a loop, or back and forth with ping_pong โ waiting wait seconds at each. |
rmp::behavior::Platformer | Gravity, jumping, ground, coyote time and a buffered jump. |
rmp::behavior::Projectile | Travels the way you pushed it and is discarded when it leaves or hits. |
rmp::behavior::Runner | Constant forward motion that SPEEDS UP over time, with a jump and a duck. |
rmp::behavior::Shooter | Fires. |
rmp::behavior::Spawner | Produces objects every N seconds, or every N units TRAVELLED. |
rmp::behavior::StateMachine | Named states and the moves between them: an enemy that idles, patrols, chases and flees; a boss's phases. |
rmp::behavior::Talker | Someone to talk to. |
rmp::behavior::Timer | Calls you every N seconds. |
rmp::behavior::TopDown | Eight directions, and the sprite chosen from the one you are facing. |
rmp::behavior::Tween | Moves one property of its object from from to to over seconds, along an Ease. |