<aside> 🗒️ This component has an Event Linkers

</aside>

The damager script is essential in dealing damage with the weapons. This script utilises the Collider Group script/colliders to tell the game what part of the weapon is to deal this type of damage. The script will tell the user what the damager type it is set up for through an information box, also.

DamagerScript.png

Damager Components

"Collider Group" and "Collider Only"

The Collider Group is another script used to reference a set of colliders. If there is one collider referenced, it would be best to reference this one collider in the "Collider Only" field. However, this is not required if it is referenced as a collider group. This component tells the game what collider deals this type of damage.

Direction

The "Direction" parameter of the damager script is to make it so the damager deals damage if hit in this direction. For example, a "Pierce" damager has Direction set to "Forward" so that it stabs when thrust or thrown forwards. Please note: Z Axis/Blue Arrow is Forwards, Y Axis/Green Arrow is Upwards.

PenDirection.png

<aside> 🗒️ "Forward" only deals damage when thrown/thrusted/slashed on the positive Z axis / Pointing Blue Arrow

</aside>

<aside> 🗒️ "Forward and Backward" only deals damage when thrown/thrusted/slashed on positive AND negative Z axis / Pointing Blue Arrow AND Other direction

</aside>

<aside> 🗒️ "All" Deals damage in all directions

</aside>

Penetration Length

The Penetration Length extends to the length of the blade, and is made for slashing objects. For swords, this will extend the length of the whole blade, and for axes it shall show the height of the blade. This is mainly used for slashing, for where the depth must be the distance between the length and the edge of the blade, or, for axes, the damager should be set up with slashing and piercing combined.

PenLength.png

Penetration Depth

The Penetration Depth is to depict how far a weapon can pierce an object. For example, a dagger has a Penetration Depth set to end at the handle, meaning that it will stop piercing once it reaches that point.

For Slash Damagers, the Penetration Depth must be from center to the edge of the blade, and for axe damagers, the depth goes from the edge of the blade to how far the axe is to pierce.

DaggerAndAxe.PNG

PenDepth.png

Penetration Exit on Max Depth