RockStars! - Anim Sequence
Dylan Torres Dylan Torres

RockStars! - Anim Sequence

In this Animation Sequence, Animation Notifies and Notify States control the Rhythmic Attack system.

The first Notify State, AnimNS_HitDetection, is a state that spawns a Sphere Trace for Objects at a designated location per frame tick. In the context of gameplay, every frame from 15 to 22 spawns a hit sphere around the character’s right hand that damages an enemy within the radius.

At frame 25, a Notify titled CanAttackAgain fires. This Notify enables the player to perform their next melee attack in the three-hit combo sequence.

At frame 30, a Notify NS_PerfectHitParticle fires. A particle spawns behind the player’s head, noting the start of Notify State AnimNS_PerfectHitRange.If any attack is performed from frame 30 to 36 of the attack animation, the notify will double the damage of the next attack the player performs.

From this point, this Animation Sequence has a Animation Montage created. This Montage preserves all the Notifies and Notify States of the Sequence, and it allows the attacks to be called by Play Montage functions within the BP_ThirdPersonController blueprints.

(1/4)

Read More
RockStars! - Anim Montage
Dylan Torres Dylan Torres

RockStars! - Anim Montage

Once the Animation Montage is created, new Notifies are added to further refine the logic implemented in the Animation Sequence.

At frame 1 in each attack, a Notify titled AN_PerfectHitFX fires. If a follow-up attack (prompted by CanAttackAgain) is performed at any frame tick during AnimNS_PerfectHitRange, a special VFX will play. This VFX denotes that the attack was perfectly timed, allowing the player to visually register their next attack will deal bonus damage.

At frame 17, a Notify titled AN_MicAudioNotify fires. This plays the attack SFX as the animation plays, adding to the impact of the attack swing.

At frame 36, a Notify titled AN_DamageDefault fires. This causes damage output of the player to reset back to its default value. This Notify is intended to play at the end of the AnimNS_PerfectHitRange, but it plays in its own Notify rather than in a Received Notify End for the aforementioned Notify State. This is because if the animation montage for the next attack in the combo is played, Received Notify End will call, resetting the damage value and making the attack always deal default damage regardless of timing. Conversely, firing in its own Notify State will not always call the function.

(2/4)

Read More
RockStars! - Perfect Hit Notify
Dylan Torres Dylan Torres

RockStars! - Perfect Hit Notify

Looking closely at the AnimNS_PerfectHitRange, there are controls meant to edit the damage values on each weapon. Once the notify begins, the notify takes the owner of the animated mesh, then casts it to the player character. Considering the player character is the only actor who can perform Rhythmic Attacks with perfect timing multipliers, only BP_ThirdPersonCharacter is a cast target for this Notify State.

From there, BP_ThirdPersonCharacter calls the function Perfect Hit Timing. Within this function are controls to multiply the default damage output by a factor of 2. There are optional events to call in order to add extra juice from within the function itself. One such event is Temp Player Damage VFX, called from BP_ThirdPersonCharacter. However, given that this is a placeholder effect meant to be swapped out for a more polished effect tailored to the attack, it has been disconnected from the other methods.

(3/4)

Read More
RockStars! - Perfect Hit Timing
Dylan Torres Dylan Torres

RockStars! - Perfect Hit Timing

Within BP_ThirdPersonCharacter, the aforementioned function Perfect Hit Timing edits the damage values applied through each attack.

In the Variables section at the bottom left of the provided image, an array of the custom BP Weapon class called Weapons is visible. Both this and the Switch on Int code block that edits the Damage Output float are adjusted by an integer value titled CurrentWeaponIndex. This integer is tied to the Weapons array, serving as an index for it. If its value is set to 0, it means the XLR Mic is the player’s equipped weapons. A value of 1 means the Keytar is equipped, and a value of 2 means the Lead Electric Guitar is equipped.

A standard Rhythmic Attack that is not executed within the Perfect Hit Range will have a Damage Output of 25 with the XLR Mic, 5 with the Keytar, and 50 with the Lead Electric Guitar. Conversely, if the Rhythmic Attack is called within the Perfect Hit Range, damage output is set to 50 for the XLR Mic, 10 for the Keytar, and 100 for the Lead Electric Guitar. From there, the boolean IsAttackingPERFECT is set to true, which is used to check off the notify AN_PerfectHitFX in the animation montage. When true, additional VFX will play to signify the attack was perfectly timed.

(4/4)

Read More