Articles

From Rivals of Aether Unofficial Workshop Manual

Revision as of 21:04, 16 July 2024 by 2600:1702:700:7520:ed2f:ff55:2dfa:f2c7 (talk) (Whitespace adjustments)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Articles are non-hitbox objects that your character can create. These include objects that can be placed on the stage like Orcane’s puddle, objects that create hitboxes when enemies get near like Lily, objects that follow you around like Sein, objects that block player movement like Kragg’s rock, objects that act like platforms like Shovel Knight’s Mobile Gear, and pretty much anything else you can think of.

Each modded character has access to 5 different articles: obj_article1, obj_article2, obj_article3, obj_article_solid, and obj_article_platform. The solid article blocks player movement, while the platform article will only block player movement if they land on it.

⚠️

Note that the platform article expects its y-position to represent the top of the article. Having the top of the platform's mask any higher or lower will result in unpredictable behavior, as the game will always attempt to snap a landing player to the article's y-position.


Articles have a few built-in variables that allow you to modify the way they react to certain scenarios:

Variable Description
sprite_index The sprite to use for this article's appearance
mask_index The sprite to use for this article's collision.

Ignores spr_dir and image_index

image_index The current animation frame for this article's sprite_index
hsp The horizontal speed of the article
vsp The vertical speed of the article
free Whether the article is in the air or not
can_be_grounded Determines if the article follows platforms when free == false.

False by default

ignores_walls Determines if the article goes through walls.

True by default

hit_wall Is true if the article hit a wall due to its own movement
spr_dir The direction the article is facing:
  • 1 = right
  • -1 = left

ℹ️

Note: This variable does not flip the article's collision mask. To do that, you must use image_xscale, which affects both the sprite and the mask, but does not affect hitbox directions like spr_dir does.

player_id The id of the object’s owner
hitstop The frames remaining in hitpause.

Hitpause automatically prevents movement

uses_shader Whether the article is recolored by the player’s shader or not.

True by default

disable_movement Setting this to true disables the article's default movement code, including movement from hsp and vsp as well as collision logic.

Set is_hittable to true to turn your article into a hittable article that will run the associated article#_hit.gml script when hit.

⚠️

Note that is_hittable doesn't properly account for hitboxes with hbox_group == -1, which will register a hit on every active frame and generate a lot of excess hitpause. Depending on your needs, a custom handler or a template such as Supersonic's Complex Hit Detection may be more appropriate.

There are a few variables only relevant for hittable articles.

Variable Description
is_hittable Whether or not the article runs article#_hit.gml when colliding with a hitbox.

False by default

hittable_hitpause_mult The hitpause multiplier to apply when hit
enemy_hitboxID Used in article#_hit.gmlThe ID of the hitbox that just hit this article
hit_player_obj The object ID of the last player to hit this article
hit_player The player number of the last player to hit this article
hit_dir The kb_angle (also known as HG_ANGLE) of the hitbox that most recently hit this article if is_hittable is True.
can_be_hit[player] An array representing the hit lockout for each player slot.

Contrary to how it's named, values above 0 mean the article 'cannot' be hit by the player slot at the given array index. Each index is decremented every frame, like with move_cooldown.

Articles are referred to as instances. To spawn an article, use the instance_create( x, y, object ) function.

Stage also have their own forms of articles. See Stage Articles for stage article variables.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.