sm.melee
Information about melee attacks are located in `/Data/Melee/attacks.json`.
Functions:
sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay=0, power=5000)
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=0 | The number of ticks before performing the attack. (Defaults to 0) |
number | power=5000 | The strength of the knockback power. |
sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay=0, power=5000)
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=0 | The number of ticks before performing the attack. (Defaults to 0) |
number | power=5000 | The strength of the knockback power. |
sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay=0, power=5000)
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=0 | The number of ticks before performing the attack. (Defaults to 0) |
number | power=5000 | The strength of the knockback power. |
sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay=0, power=5000)
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=0 | The number of ticks before performing the attack. (Defaults to 0) |
number | power=5000 | The strength of the knockback power. |