Rivals of Aether

Rivals of Aether

Venus
This topic has been locked
Bar-Kun  [developer] 24 Aug, 2024 @ 6:35am
Rune Reflect Compatibility
NOTE: NONE OF THE VARIABLES USED HERE RESET AUTOMATICALLY

ARTICLE COLLISIONS
you can add compatibility for venus to reflect your articles! use the
"venus_article_reflect" variable to decide how it should reflect
0: no reflect - default setting
1: letting venus handle reflections - reflecting articles based on if they are moving
2: custom reflection - you control the logic entirely

if you want to detect the rune that reflected you may use "venus_rune_ID"

for custom reflects you need this initial setup in article_update:
if ("venus_rune_ID" in self && venus_rune_ID != noone && !venus_reflected)
after you are done with your custom reflection just add "venus_reflected = true;" and "venus_rune_ID = noone;" at the end of the statement

example:
if ("venus_rune_ID" in self && venus_rune_ID != noone && !venus_reflected) { hsp = -2; venus_reflected = true; venus_rune_ID = noone; }

FOR PROJECTILE TIED TO ARTICLES
additionally, if your projectile is tied to an article and it causes problems, you can filter out the projectile entirely using the "venus_article_proj_ignore" variable on the hitbox itself with hitbox_update.gml and the like


PLAYER COLLISIONS
the same compatibility can be used for players aswell, using "venus_player_reflect" instead, with the same settings and usage
keep in mind that while attacking the rune can't be damaged by the player collision regardless of which version of the compatibility you are using, so use the rune's "hp" variable to be able to damage the article if you need to

NOTE: melee hitboxes reduce hp by 1 and usually done by default, projectiles/hitstun knockbacks reduce hp by 0.5

example:
if (attack == AT_FSPECIAL) { if (window == 2) venus_player_reflect = 1; { if ("venus_rune_ID" in self && venus_rune_ID != noone && !venus_reflected) { hsp = -2; venus_reflected = true; venus_rune_ID = noone; } } else venus_player_reflect = 0; }
Last edited by Bar-Kun; 30 Aug, 2024 @ 4:22pm