The Weapon Asset¶
To create a new Weapon asset, right click on the Project Panel and select Create → Game Creator → Melee → Weapon.
Title and Description allow to give it a name and description, which can later be used to display on the user interface. Icon and Color provide similar functionality for changing the graphic and its tint color.
Give it a unique ID
Weapons are identified by their unique ID value, not by the asset name. Make sure all your weapons have a unique ID value!
Shields & Reactions¶
The Shield field is only necessary if you're using any kind of blocking mechanic. How blocking attacks work is covered more in depth in the Shields section.
The Hit Reaction and Parried Reaction fields allow to define a Reaction asset that plays an animation when the character gets hit or its attack is parried by another character.
When a Weapon is equipped, the character using it can automatically switch to the defined animation State. This allows, for example, to hold a sword with the right hand when equipping a Sword Weapon and change the gait when wielding it.
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 Combos field allows to define which Skills will be executed under which conditions when inputting Charge and Execute commands (see Input for more information).
There are two ways to define the Combos of a weapon: Using a Combo reference asset, or embedding one directly.
Use Combo references
We recommend using Combo asset references when possible as they are more flexible and allow to reuse the same move-sets for multiple weapons. However if you're certain you'll only use one move-set for a particular weapon, you can embed it directly and save up space in your project folder.
To embed a Combo directly you can use the Embedded option and the field below will turn into a Combo Tree where you can define the order and conditions in which attacks are executed.
The On Equip instructions are executed whenever this Weapon is equipped by a Character. This is the perfect place to instantiate and attach a prop representing the weapon onto the targeted character.
The On Unequip instructions are executed when the Weapon is unequipped by the Character.
The On Dodge instructions are executed when the Weapon wielder dashes through an attack and is invulnerable during those frames.