Skip to content

weapon_custom_projectile

wootguy edited this page Jun 5, 2018 · 3 revisions

Projectiles are physical entities that are launched from the weapon.

Some possibilities:

  • grenades
  • bouncy balls
  • zombies
  • sticky bombs.

Keyvalues:

Keyvalue
Value Type
Description
________________________________
Projectile Type
integer
Choose a prefab or set to custom/other to build your own type.
Projectile Entity
string
If Projectile Type is set to Other or Tripmine, then this is the class name of the entity you want to spawn.
Projectile Speed
float
Initial velocity of the projectile.
Projectile Direction
Vector
Direction of the projectile, relative to the aim direction. Coordinates are given as Right, Up, and Forward units. Usually you want to set this to straight forward (0 0 1).
Projectile Elasticity
float
Percentage of speed reflected after hitting a surface.
Projectile Gravity
float
Percentage of gravity applied to the projectile.
Projectile Air Friction
float
Percentage of speed to reduce while the projectile is in the air.
Only for Custom projectiles, currently.
Projectile Water Friction
float
Percentage of speed to reduce while the projectile is in water.
Only for Custom projectiles, currently.
Projectile Angles
Vector
Initial Pitch/Yaw/Roll for the projectile.
Projectile Angular Velocity
Vector
Initial Pitch/Yaw/Roll rotation speed for the projectile.
Projectile Offset
Vector
Projectile spawn offset, relative to the player's gun position. Coordinates are given as Right, Up, and Forward units.
Projectile Plyr. Vel. Influence
Vector
Percentage of player velocity to add to the initial velocity of the projectile. Coordinates are given as Right, Up, and Forward percentages, and are relative to the player's aim direction. The Up axis always points above the player, no matter where they're aiming.
Projectile Life Time
float
Time in seconds before the projectile is removed from the world.
Projectile Model
string
Custom model for the projectile.
Only for Custom and Other projectiles, currently.
Projectile Movement Sound
weapon_custom_sound
Looping sound attached to the projectile while it is alive.
Projectile Sprite
string
Sprite that attaches to the projectile.
Projectile Sprite Color
Color
Color of the attached sprite.
Projectile Sprite Scale
float
Size of the attached sprite.
Projectile Follow Behavior
integer
Choose if you want the projectile to follow your crosshairs (like the RPG) or nearby enemies (like the hornet gun).
Projectile Follow Radius
float
If Projectile Follow Behavior is set to Follow Nearby Enemies, then enemies must be within this radius for them to be targeted.
Projectile Follow Turn Angle
float
If the projectile is set to follow something, then the projectile turning radius will be limited to this value.
Projectile Follow Delay + Dur. + Freq.
3 floats
If Projectile Follow Behavior is set to Follow Crosshairs, then these 3 values are applied as follows:
Delay = The time before the projectile begins following after the shot is fired.
Duration = The time until the projectile will stop following.
Frequency = The delay between follow updates, which impacts turning speed and server performance.
Projectile Trail Sprite
string
If set, a beam trail is added to the projectile using this sprite.
Projectile Trail Life
integer
Life time of the trail (Seconds*0.1).
Projectile Trail Width
integer
Size of the trail.
Projectile Trail Color
Color
Color and opacity of the trail.
Projectile Trail Effect
weapon_custom_effect
Effect to repeatedly spawn on the projectile while it is alive.
Projectile Trail Effect Frequency
float
Delay between spawns of the trail effect.
Projectile Hull Size
float
Size of the projectile's collision hull.
Projectile Life Expired Effect
weapon_custom_effect
Effect to spawn when the projectile's life time has expired.
Projectile Custom Hit World Action
integer
Action to take when the projectile impacts a solid surface.
Projectile Custom Hit World Effect
weapon_custom_effect
Effect to spawn when the projectile impacts a solid surface.
Projectile Custom Hit Monster Action
integer
Action to take when the projectile impacts a monster.
Projectile Custom Hit Monster Effect
weapon_custom_effect
Effect to spawn when the projectile impacts a monster.
Projectile Bounce Effect Min. Freq
float
Minimum time to wait before spawning another effect triggered by bouncing off a surface or monster.

See the Shoot Entities page for the common keyvalues and flags that this entity uses.

Clone this wiki locally