sm.melee
Information about melee attacks are located in `/Data/Melee/attacks.json`.
Functions:
sm.melee.getMeleeAttackHits(uuid, origin, directionRange, source)
Performs melee attack check and returns a table of raycast results.
Parameters:
| Type | Name | Description |
|---|---|---|
| Uuid | uuid | The uuid of the melee attack. |
| Vec3 | origin | The source position of the attack. |
| Vec3 | directionRange | The direction and reach of the attack. |
| Unit | source | The unit that is the source of the attack. |
Returns:
| Type | Description |
|---|---|
| table | RaycastResult A table containing RaycastResult data. |
sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)
Deprecated:
Name is deprecated, use uuid instead
Perform a melee attack
Parameters:
| Type | Name | Description |
|---|---|---|
| string | name | The name of the melee attack. |
| integer | damage | The damage the attack will inflict. |
| Vec3 | origin | The source position of the attack. |
| Vec3 | directionRange | The direction and reach of the attack. |
| Player | source | The player that is the source of the attack. |
| integer | delay? | The number of ticks before performing the attack. (Defaults to 0) |
| number | power? | The strength of the knockback power. (Defaults to 5000) |
| table | ignoreCharacters | A table of characters to ignore in the attack. (optional) |
sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)
Deprecated:
Name is deprecated, use uuid instead
Perform a melee attack
Parameters:
| Type | Name | Description |
|---|---|---|
| string | name | The name of the melee attack. |
| integer | damage | The damage the attack will inflict. |
| Vec3 | origin | The source position of the attack. |
| Vec3 | directionRange | The direction and reach of the attack. |
| Unit | source | The unit that is the source of the attack. |
| integer | delay? | The number of ticks before performing the attack. (Defaults to 0) |
| number | power? | The strength of the knockback power. (Defaults to 5000) |
| table | ignoreCharacters | A table of characters to ignore in the attack. (optional) |
sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)
Perform a melee attack
Parameters:
| Type | Name | Description |
|---|---|---|
| Uuid | uuid | The uuid of the melee attack. |
| integer | damage | The damage the attack will inflict. |
| Vec3 | origin | The source position of the attack. |
| Vec3 | directionRange | The direction and reach of the attack. |
| Player | source | The player that is the source of the attack. |
| integer | delay? | The number of ticks before performing the attack. (Defaults to 0) |
| number | power? | The strength of the knockback power. (Defaults to 5000) |
| table | ignoreCharacters | A table of characters to ignore in the attack. (optional) |
sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)
Perform a melee attack
Parameters:
| Type | Name | Description |
|---|---|---|
| Uuid | uuid | The uuid of the melee attack. |
| integer | damage | The damage the attack will inflict. |
| Vec3 | origin | The source position of the attack. |
| Vec3 | directionRange | The direction and reach of the attack. |
| Unit | source | The unit that is the source of the attack. |
| integer | delay? | The number of ticks before performing the attack. (Defaults to 0) |
| number | power? | The strength of the knockback power. (Defaults to 5000) |
| table | ignoreCharacters | A table of characters to ignore in the attack. (optional) |