sm.projectile.harvestableCustomProjectileAttack

Perform a customized projectile attack

Kind: Function

Environments: Game

Game

Overload 1

sm.projectile.harvestableCustomProjectileAttack(
    userdata,
    name,
    damage,
    position,
    velocity,
    source,
    delay
)

Open the full Game reference

Availability: Server only

Deprecated: Name is deprecated, use uuid instead

Parameters:

Name Type Description
userdata table The custom user data
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.harvestableCustomProjectileAttack(
    userdata,
    uuid,
    damage,
    position,
    velocity,
    source,
    delay,
    acceleration,
    lifetime
)

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
userdata table The custom user data
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)