🛡️MWeapon Global Properties

Overview

All weapons inherit from the MWeapon class and share the following properties.

Properties

General

Active

Enable/disable the Weapon logic. Disable weapons will not cause any damage

Debug

It shows in the console all the logic a weapon is doing while it is being used.

Index [Generate]

Unique Index to differentiate a same weapon type from another ... (e.g. a sword made of wood and another made of steel. Both have almost the same values. only changing the damage it does).

Layer

Hit Layer

Layers that interact with the weapon. What objects the weapon can hit.

Trigger Interaction

Will the weapon hit triggers or not

Attack Direction

When true, the weapon will apply forces to rigidbodies using the velocity of the weapon.

When false, it will use the Forward direction of the Owner, to apply forces to the hit rigidbodies.

Don't Hit Owner

It allows to ignore internal colliders inside the Owner of the weapon. Useful if the weapon hits an arm or a Leg inside the character.

Weapon Data

Type

Gets the Weapon Type ID. This value is used in the Animator to Play the correct animation for the weapon. It also is the Mode Animations the weapon will have inside the Animal Controller inside the Character.

Ground Arm Pose

Use a Arm Pose when the weapon is equipped while Grounded. It will keep playing an animation for an arm while the weapon is equipped

This weapon arm animations are located in the Arms Layers in the Animator Controller:

Riding Pose

Use an Arm Pose when the weapon is equipped while Grounded. It will keep playing an animation for an arm while the weapon is equipped.

Holsters Parameters

Holsters

The identifier value of the Holster any weapon can be stored. The Holsters are set on the Weapon Manager

This value is also used to play the store/sheathe and draw/unsheathe weapon animations.

Holster Anim

It overrides the Animation value of the holster. But the weapon will still be stored on the original holster. E.g The Spear uses the Left Holster(For melee weapons) but it will play the Back Holster animations

Holster Index

Index of the Array of Holster gameobjects a weapon can be stored. E.g. The Sword and the Spear both share the same Holster ID [Left Holster] for Melee Weapons. This means they cannot be stored at the same time. The sword will make the spear drop to the ground and vice versa when equipped.

The sword's Holster Index is 0 and the weapon will be stored in the Hip, the spear uses Holster Index = 1 and it will be stored in the back.

Ignore Draw

No Draw Animations will be played only for this weapon

Ignore Store

No Store Animations will be played only for this weapon

Animal Controller

Stance

When the weapon is equipped. it will also activate a stance. Useful for weapons that changes completely the way the character moves

Strafe On Aim

When the weapon is aiming, strafe will be activated on the animal controller. Useful for Shooteable weapons

Strafe on Equip

When the weapon is equiped, strafe will be activated on the animal controller. Useful for Shooteable weapons

Aim Side

Which Aim Camera activates when Aiming.. Left, Right or None

Hand & Holster

Rigth Hand (Left Hand)

Hand Offset

Holster Offset

Last updated