Skip to content

Shields

Shields are optional assets that allow to block incoming attacks.

Blocking, Parrying and Breaking

Because there is no standard nomenclature throughout all games we decided to pick the following terms. However you can choose to name them in your game as you see fit:

  • Block: Stop any incoming attack while shielding that isn't a Parry.
  • Parry: Stop an attack where the time window between raising the shield and blocking is shorter than a certain amount. Some games call this Deflect or Perfect Blocking.
  • Break: Whenever the defense position of a character is broken, due to receiving too many impacts.

The Shield Asset

To create a new Shield asset, right click on the Project Panel and select CreateGame CreatorMeleeShield.

Melee Shield Asset

Defense

The upper-most values determine how the weapon can defend from incoming attacks.

Melee Shield Defense

The Angle field determines how aligned must the character be towards the attack in order to block it, starting from the front. For example, if the angle is 180 degrees, the character will defend from any attack that comes from the front and sides. A value of 360 will block any attacks from any direction.

The Parry Time field determines the maximum time window, in seconds, between the block starts and an attack connects to be considered a Parry. If the time between raising the shield and blocking the attack is higher than this value, it will be considered a normal Block.

The Defense value is a number that decreases with each blocked attack. If the value reaches zero, the defense will be broken and any other attack will hit the Character.

Visualizing the Defense value

To visualize the current Defense of a character, enter Play Mode and select the character. Once a weapon is equipped, a few new fields will appear at the end showcasing the currently equipped weapons and combat values.

Melee Shield Defense at Runtime

The Cooldown determines how long it takes to start recovering Defense after decreasing it from a blocked attack.

The Recovery field determines the pace at which Defense is recovered, in seconds. For example, a value of 2 means it will recover 2 units per second.

States

A Shield allows to change the animation State of the character when rising the shield and stop it automatically when lowering the defense.

Melee Shield States

State Layer

It's very important to be conscious about the State Layer field! By default, all characters equipping a weapon will use the layer index 5 as the layer index. Shields use the layer index 7, which is two units higher than the Weapon layer index so that the blocking state overrides the weapon one during that state. Layer 6, by default, is reserved for Charged Skills.

The Speed field allows to run the whole State animations faster or slower using a coefficient. A value of 1 means the animation will run normally and a value of 0.5 means the animations will be in slow-motion.

Transition In and Transition Out fields determine the time in seconds it takes to blend into the state. We recommend using small values, between 0.1 and 0.5 seconds.

Blocking

Blocking happens whenever the character blocks an incoming attack that isn't perfectly blocked (also known as parried).

Melee Shield Blocking

The Block Reaction field allows to play an animation gesture when blocking an attack. See Reactions for more information.

The Effect field allows to instantiate a prefab at the point of impact. For example, a particle effect that highlights the blocking.

The On Block instructions are executed every time an attack is blocked, regardless of the type of attack. When these instructions are executed, Self refers to the character blocking the attack, and Target to the attacker.

Parrying

Parrying happens whenever the character blocks an incoming attack and the time between raising the shield and the impact is less than a certain amount of time. This mechanic is also commonly known as perfect blocking.

Melee Shield Parrying

The Parry Reaction field allows to play an animation gesture when parrying an attack. See Reactions for more information.

The Effect field allows to instantiate a prefab at the point of impact. For example, a particle effect that highlights the parry.

The On Parry instructions are executed every time an attack is parried, regardless of the type of attack. When these instructions are executed, Self refers to the character blocking the attack, and Target to the attacker.

Breaking

Breaking happens whenever the character's blocking defense is broken. When a character starts blocking, it has a defense gauge that decreases with every attack blocked. If the gauge value reaches zero, the defense becomes broken and the character is open to attacks.

Melee Shield Defense Broken

The Break Reaction field allows to play an animation gesture when the defense is broken. See Reactions for more information.

The Effect field allows to instantiate a prefab at the point of impact. For example, a particle effect that highlights the point where the defense is broken.

The On Break instructions are executed every time the defense is broken, regardless of the type of attack. When these instructions are executed, Self refers to the character blocking the attack, and Target to the attacker.