sm.melee

Information about melee attacks are located in /Data/Melee/attacks.json.

Functions

getMeleeAttackHits

sm.melee.getMeleeAttackHits( uuid, origin, directionRange, source )

Performs melee attack check and returns a table of raycast results.

Parameters:

Name Type Description
uuid Uuid The uuid of the melee attack.
origin Vec3 The source position of the attack.
directionRange Vec3 The direction and reach of the attack.
source Unit The unit that is the source of the attack.

Returns:

Name Type Description
RaycastResult table A table containing RaycastResult data.

meleeAttack - name + Player

sm.melee.meleeAttack(
    name,
    damage,
    origin,
    directionRange,
    source,
    delay,
    power,
    ignoreCharacters
)

Deprecated: Name is deprecated, use uuid instead

Perform a melee attack

Parameters:

Name Type Description
name string The name of the melee attack.
damage integer The damage the attack will inflict.
origin Vec3 The source position of the attack.
directionRange Vec3 The direction and reach of the attack.
source Player The player that is the source of the attack.
delay (optional) integer The number of ticks before performing the attack. (Defaults to 0)
power (optional) number The strength of the knockback power. (Defaults to 5000)
ignoreCharacters table A table of characters to ignore in the attack. (optional)

meleeAttack - name + Unit

sm.melee.meleeAttack(
    name,
    damage,
    origin,
    directionRange,
    source,
    delay,
    power,
    ignoreCharacters
)

Deprecated: Name is deprecated, use uuid instead

Perform a melee attack

Parameters:

Name Type Description
name string The name of the melee attack.
damage integer The damage the attack will inflict.
origin Vec3 The source position of the attack.
directionRange Vec3 The direction and reach of the attack.
source Unit The unit that is the source of the attack.
delay (optional) integer The number of ticks before performing the attack. (Defaults to 0)
power (optional) number The strength of the knockback power. (Defaults to 5000)
ignoreCharacters table A table of characters to ignore in the attack. (optional)

meleeAttack - Uuid + Player

sm.melee.meleeAttack(
    uuid,
    damage,
    origin,
    directionRange,
    source,
    delay,
    power,
    ignoreCharacters
)

Perform a melee attack

Parameters:

Name Type Description
uuid Uuid The uuid of the melee attack.
damage integer The damage the attack will inflict.
origin Vec3 The source position of the attack.
directionRange Vec3 The direction and reach of the attack.
source Player The player that is the source of the attack.
delay (optional) integer The number of ticks before performing the attack. (Defaults to 0)
power (optional) number The strength of the knockback power. (Defaults to 5000)
ignoreCharacters table A table of characters to ignore in the attack. (optional)

meleeAttack - Uuid + Unit

sm.melee.meleeAttack(
    uuid,
    damage,
    origin,
    directionRange,
    source,
    delay,
    power,
    ignoreCharacters
)

Perform a melee attack

Parameters:

Name Type Description
uuid Uuid The uuid of the melee attack.
damage integer The damage the attack will inflict.
origin Vec3 The source position of the attack.
directionRange Vec3 The direction and reach of the attack.
source Unit The unit that is the source of the attack.
delay (optional) integer The number of ticks before performing the attack. (Defaults to 0)
power (optional) number The strength of the knockback power. (Defaults to 5000)
ignoreCharacters table A table of characters to ignore in the attack. (optional)