Attack Indexes

From Rivals of Aether Unofficial Workshop Manual

These indexes are used when setting attack grid index and hitbox grid index values, as well as checking the attack variables of players and hitboxes.

AT_JAB
AT_DATTACK
AT_NSPECIAL
AT_FSPECIAL
AT_USPECIAL
AT_DSPECIAL
AT_FSTRONG
AT_USTRONG
AT_DSTRONG
AT_FTILT
AT_UTILT
AT_DTILT
AT_NAIR
AT_FAIR
AT_BAIR
AT_DAIR
AT_UAIR
AT_TAUNT

Extras[edit | edit source]

These attack indexes are not called automatically. Using one requires manually changing the value of the player's attack variable to the desired index in set_attack.gml or calling the attack via set_attack( attack ) from another script.

Code examples:
Example 1:
// set_attack.gml
// calls a different attack when neutral special is input while in the air
if ( attack == AT_NSPECIAL && free ) {
    attack = AT_NSPECIAL_AIR;
}

Example 2:

// attack_update.gml
// turns AT_NSPECIAL into AT_NTHROW when successfully hitting a player
// must set the hurtbox manually when calling these extra indexes via set_attack
if ( attack == AT_NSPECIAL && has_hit_player ) {
    set_attack( AT_NTHROW );
    hurtboxID.sprite_index = sprite_get("nthrow_hurt");
}

⚠️

These extra attack indexes will neither call the script set_attack.gml nor update the player's hurtbox when used with set_attack( attack ).

Additionally, you may experience issues when trying to convert one attack to another from set_attack.gml if the two attacks do not share the same AG_CATEGORY value.

AT_NSPECIAL_2
AT_NSPECIAL_AIR
AT_FSPECIAL_2
AT_FSPECIAL_AIR
AT_USPECIAL_2
AT_USPECIAL_GROUND
AT_DSPECIAL_2
AT_DSPECIAL_AIR
AT_FSTRONG_2
AT_USTRONG_2
AT_DSTRONG_2
AT_FTHROW
AT_UTHROW
AT_DTHROW
AT_NTHROW
AT_TAUNT_2
AT_EXTRA_1
AT_EXTRA_2
AT_EXTRA_3
AT_EXTRA_4
AT_EXTRA_5

Full List[edit | edit source]

In reality, the labels for the attack indexes are (nearly) arbitrary, but can help you organize attacks as you implement them. Each is a macro which returns an integer value. Only values 0 - 49 are valid attack indexes. Some do not have macros assigned to them, but can be accessed via the integer value itself.

⚠️

The attack index AT_DATTACK does actually have specific behavior. Attacks using this attack index will spawn the dash attack dust effect as well as set the player's hsp to either the value of initial_dash_speed * spr_dir or dash_speed * spr_dir on the first frame of the attack, depending on whether the attack is input during the state PS_DASH_START or PS_DASH. Holding down while performing the attack from the PS_DASH_START state will set hsp to 0 instead.

0  - 
1  - AT_JAB
2  - 
3  - 
4  - AT_FTILT
5  - AT_DTILT
6  - AT_UTILT
7  - AT_FSTRONG
8  - AT_DSTRONG
9  - AT_USTRONG
10 - AT_DATTACK
11 - AT_FAIR
12 - AT_BAIR
13 - AT_DAIR
14 - AT_UAIR
15 - AT_NAIR
16 - AT_FSPECIAL
17 - AT_DSPECIAL
18 - AT_USPECIAL
19 - AT_NSPECIAL
20 - AT_FSTRONG_2
21 - AT_DSTRONG_2
22 - AT_USTRONG_2
23 - AT_USPECIAL_GROUND
24 - AT_USPECIAL_2
25 - AT_FSPECIAL_2
26 - AT_FTHROW
27 - AT_UTHROW
28 - AT_DTHROW
29 - AT_NTHROW
30 - AT_DSPECIAL_2
31 - AT_EXTRA_1
32 - AT_DSPECIAL_AIR
33 - AT_NSPECIAL_2
34 - AT_FSPECIAL_AIR
35 - AT_TAUNT
36 - AT_TAUNT_2
37 - AT_EXTRA_2
38 - AT_EXTRA_3
39 - AT_EXTRA_4
40 - AT_EXTRA_5
41 - AT_NSPECIAL_AIR
42 - 
43 - 
44 - 
45 - 
46 - 
47 - 
48 - 
49 - 

See Also[edit | edit source]