sm.projectile.projectileAttack
Perform a projectile attack
Kind: Function
Environments: Game
Game
Overload 1
sm.projectile.projectileAttack(
name,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay
)
Deprecated: Name is deprecated, use uuid instead
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The projectile's name. |
damage |
integer | The damage the projectile will inflict. |
position |
Vec3 | The start position. |
velocity |
Vec3 | The direction and velocity. |
source |
Player | The player that is the source of the projectile. |
fakePosThird (optional) |
Vec3 | The visual start position in third-person. (Defaults to position) |
fakePosFirst (optional) |
Vec3 | The visual start position in first-person. (Defaults to position) |
delay (optional) |
integer | The number of ticks before firing. (Defaults to 0) |
Overload 2
sm.projectile.projectileAttack(
name,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay
)
Deprecated: Name is deprecated, use uuid instead
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The projectile's name. |
damage |
integer | The damage the projectile will inflict. |
position |
Vec3 | The start position. |
velocity |
Vec3 | The direction and velocity. |
source |
Unit | The Unit that is the source of the projectile. |
fakePosThird (optional) |
Vec3 | The visual start position in third-person. (Defaults to position) |
fakePosFirst (optional) |
Vec3 | The visual start position in first-person. (Defaults to position) |
delay (optional) |
integer | The number of ticks before firing. (Defaults to 0) |
Overload 3
sm.projectile.projectileAttack(
uuid,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay,
acceleration,
lifetime
)
Parameters:
| Name | Type | Description |
|---|---|---|
uuid |
Uuid | The projectile's uuid. |
damage |
integer | The damage the projectile will inflict. |
position |
Vec3 | The start position. |
velocity |
Vec3 | The direction and velocity. |
source |
Player | The player that is the source of the projectile. |
fakePosThird (optional) |
Vec3 | The visual start position in third-person. (Defaults to position) |
fakePosFirst (optional) |
Vec3 | The visual start position in first-person. (Defaults to position) |
delay (optional) |
integer | The number of ticks before firing. (Defaults to 0) |
acceleration (optional) |
number | The acceleration of the projectile. (Defaults to 0) |
lifetime (optional) |
integer | The max lifetime of the projectile in ticks. (Defaults to 400) |
Overload 4
sm.projectile.projectileAttack(
uuid,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay,
acceleration,
lifetime
)
Parameters:
| Name | Type | Description |
|---|---|---|
uuid |
Uuid | The projectile's uuid. |
damage |
integer | The damage the projectile will inflict. |
position |
Vec3 | The start position. |
velocity |
Vec3 | The direction and velocity. |
source |
Unit | The Unit that is the source of the projectile. |
fakePosThird (optional) |
Vec3 | The visual start position in third-person. (Defaults to position) |
fakePosFirst (optional) |
Vec3 | The visual start position in first-person. (Defaults to position) |
delay (optional) |
integer | The number of ticks before firing. (Defaults to 0) |
acceleration (optional) |
number | The acceleration of the projectile. (Defaults to 0) |
lifetime (optional) |
integer | The max lifetime of the projectile in ticks. (Defaults to 400) |