Melee Combat System
  • Melee Combat System
  • Quick Start
  • Weapon
  • Attack
  • Reaction
  • Input Manager
  • Parkour Integration
  • Playable Demo
  • Custom Animation Event
Powered by GitBook
On this page

Attack

PreviousWeaponNextReaction

Last updated 8 months ago

Attack Data is a ScriptableObject that contains detailed information about a specific attack. It includes various attributes that define the attack’s behavior, visual and audio effects, and interactions with targets.

Create Attacks

You can create attacks by going to Create > Combat System > Create Attack.

Attack Data

General Settings:

  • Animation Clip: The animation associated with this attack.

  • Impact Start Time: Start time of the impact relative to the animation.

  • Impact End Time: End time of the impact relative to the animation.

  • Wait for Next Attack: Indicates if the next attack should wait before being triggered.

  • Wait for Attack Time: Time to wait before the next attack, relative to the animation.

  • Hitbox to Use: The hitbox to apply for this attack.

  • Finisher: Indicates if this attack is a finishing move.

  • Rotate to Target: Determines if the character should always face the target during the attack.

  • Damage: The amount of damage caused by this attack.

  • Hit Direction: The direction in which the attack hits.

  • Reaction Tag: Tag used to identify the reaction to this attack.

  • Unblockable Attack: Indicates if this attack is unblockable.

Override Reaction:

  • Override Reaction: Indicates if the reaction should be overridden.

  • Clip: The animation clip associated with this reaction.

  • Will Be Knocked Down: Indicates whether the character will be knocked down as part of this reaction.

  • Knock Down Direction: The direction in which the character will be knocked down.

  • Lying Down Time Range: The range of time (in seconds) for how long the character will remain lying down before getting up.

  • Override Lying Down Animation: Indicates if the default lying down animation should be replaced with a custom one.

  • Lying Down Animation: The animation clip to use for the lying down phase.

  • Get Up Animation: The animation clip to use for the character getting up.

  • Is Synced Reaction: Indicates if the reaction should be synced with the animation.

  • Sync Start Time: Start time of the synced reaction, relative to the animation.

  • Rotate To Attacker: Indicates if the target should be rotated during the reaction.

  • Rotation Offset: Rotation offset applied to the target during the reaction.

Override Blocked Reaction:

  • Override Blocked Reaction: Indicates if the blocked reaction should be overridden.

  • Blocking Clip: The blocked animation clip associated with this reaction.

  • Is Synced Blocked Reaction: Indicates if the blocked reaction should be synced with the animation.

  • Block Sync Start Time: Start time of the synced blocked reaction, relative to the animation.

  • Rotate Target in Blocked: Indicates if the target should be rotated during the blocked reaction.

  • Rotation Offset in Blocked: Rotation offset applied to the target during the blocked reaction.

Counter:

  • Can Be Countered: Indicates if this attack can be countered.

  • Counter Attack: The AttackData associated with the counterattack.

  • Counter Start Time: The relative time in the animation when the counterattack should begin.

  • Max Distance for Counter: Maximum distance below which the counter can be performed.

  • Health Threshold for Counter: Health threshold below which the counter can be performed.

Target Matching:

Target Matching Attacks in Unity include three types:

Snapping: Attacks are aligned directly with the target position, resulting in accurate strikes regardless of the player's position.

Linear: Executes attacks in a straight path toward the target

Rootmotion: Root Motion matching scales the attack animation so that the attacker reaches the target point accurately.

Choose the type that fits your attack needs and enhances your gameplay experience.

  • Move to Target: Indicates if the character should move to the target.

  • Move Type: The type of target matching movement.

  • Move Start Time: Start time of the movement relative to the animation.

  • Move End Time: End time of the movement relative to the animation.

  • Distance from Target: The distance the character should move to from the target.

  • Ignore Collisions: Indicates if collisions should be ignored during movement.

  • Weight Mask: The weight mask applied during root motion.

  • Root Curves: The root motion curves of this attack.

  • Snap Type: The type of snapping to use for this attack.

  • Local Position from Target: Local position offset from the target.

  • Snap Target: The target to snap to for this attack.

SFX (Sound Effects):

  • Strike Sound: Sound played when the strike occurs.

  • Hit Sound: Sound played when the attack hits.

  • Blocked Hit Sound: Sound played when the attack is blocked.

  • Reaction Sound: Sound played when the target reacts to this attack.

VFX (Visual Effects):

  • Hit Effect: Visual effect played when the attack hits.

  • Blocked Hit Effect: Visual effect played when the attack is blocked.

Camera Effects:

  • Camera Shake Amount: Intensity of the camera shake effect.

  • Camera Shake Duration: Duration of the camera shake effect.