Next: , Previous: , Up: Combat   [Contents][Index]


6.8 MeleeWeapon

Component: MeleeWeapon

This represents a melee weapon that is held by a Character Omnicontroller somewhere in it’s heirarchy. When attacking, the omnicontroller will use this melee weapon component to determine the base attributes of a given melee attack. The weapon damage for each is additive, meaning that if a player holds a weapon in each hand, each with a damage value of 10, then the total damage will become 20 plus any bonus damage set using ’SetBonusDamage’ (which only adds damage to the next attack). To use with inventory, this should be attached to the ’Active’ object, not the pickable, so that when it’s equipped this component will be in the player’s heirarchy.

Field of MeleeWeapon: float damageDelay

How long after the start of the animation do we wait to apply damage? Time this with the point when the attack should connect.

Default value: 1

Field of MeleeWeapon: string animationTrigger

If supplied, play this animation instead of the default attack animation.

Default value: ""

Message on MeleeWeapon: SetBonusDamage (float)

Adds additional damage to the next attack. Resets to 0 after attack

Argument: How much additional damage should we add?

Field of MeleeWeapon: float damageDelay

How long after the start of the animation do we wait to apply damage? Time this with the point when the attack should connect.

Default value: 1

Field of MeleeWeapon: string animationTrigger

If supplied, play this animation instead of the default attack animation.

Default value: ""

Message on MeleeWeapon: SetBonusDamage (float)

Adds additional damage to the next attack. Resets to 0 after attack

Argument: How much additional damage should we add?


Next: , Previous: , Up: Combat   [Contents][Index]