sm.projectile.customProjectileAttack
Perform a customized projectile attack
Kind: Function
Environments: Game
Game
Overload 1
sm.projectile.customProjectileAttack(
userdata,
name,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay
)
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 |
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.customProjectileAttack(
userdata,
name,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay
)
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 |
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.customProjectileAttack(
userdata,
uuid,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay,
acceleration,
lifetime
)
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 |
World | The world 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.customProjectileAttack(
userdata,
uuid,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay,
acceleration,
lifetime
)
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 |
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 5
sm.projectile.customProjectileAttack(
userdata,
uuid,
damage,
position,
velocity,
source,
fakePosThird,
fakePosFirst,
delay,
acceleration,
lifetime
)
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 |
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) |