sm.projectile.harvestableProjectileAttack
Perform a projectile attack
Kind: Function
Environments: Game
Game
Overload 1
sm.projectile.harvestableProjectileAttack(
name,
damage,
position,
velocity,
source,
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 in world space. |
velocity |
Vec3 | The direction and velocity. |
source |
Harvestable | The Harvestable that is the source of the projectile. |
delay (optional) |
integer | The number of ticks before firing. (Defaults to 0) |
Overload 2
sm.projectile.harvestableProjectileAttack(
uuid,
damage,
position,
velocity,
source,
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 in world space. |
velocity |
Vec3 | The direction and velocity. |
source |
Harvestable | The Harvestable that is the source of the projectile. |
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) |