sm.melee.meleeAttack
Perform a melee attack
Kind: Function
Environments: Game
Game
Overload 1
sm.melee.meleeAttack(
name,
damage,
origin,
directionRange,
source,
delay,
power,
ignoreCharacters
)
Deprecated: Name is deprecated, use uuid instead
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) |
Overload 2
sm.melee.meleeAttack(
name,
damage,
origin,
directionRange,
source,
delay,
power,
ignoreCharacters
)
Deprecated: Name is deprecated, use uuid instead
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) |
Overload 3
sm.melee.meleeAttack(
uuid,
damage,
origin,
directionRange,
source,
delay,
power,
ignoreCharacters
)
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) |
Overload 4
sm.melee.meleeAttack(
uuid,
damage,
origin,
directionRange,
source,
delay,
power,
ignoreCharacters
)
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) |