Npc launcher
Jump to navigation
Jump to search
Entity description
Can fire rocket-propelled grenades or other missiles with many property customizations. The missiles can be made to home on a target or follow a path.
Keyvalues
- StartOn
- <boolean>
- MissileModel
- <studio>
- LaunchSound
- <sound>
- FlySound
- <sound>
- SmokeTrail
- <choices>
Literal Value Description 0 Off 1 On 2 On Homing
- LaunchSmoke
- <boolean>
- LaunchDelay
- <integer> When ON, how long to wait between each launch
- LaunchSpeed
- <float> Initial launch speed of missile (in up direction)
- PathCornerName
- <target_destination> Name of a path corner. If set launches a pathfollowing missing, rather than a homing missile
- HomingSpeed
- <float> Speed to reach when homing
- HomingStrength
- <integer> How strong in homing effect (0-100). Higher values yield sharper turning ability.
- HomingDelay
- <float> Number of seconds to delay before homing starts
- HomingRampUp
- <float> Number of seconds it takes to reach full homing strength after homing delay
- HomingDuration
- <float> Number of seconds the homing effect lasts
- HomingRampDown
- <float> Number of seconds it takes homing effect to decay after homing duration
- Gravity
- <float> Scale for effect of gravity. (1.0 = normal gravity)
- MinRange
- <float> Minimun distance a target can be to be attacked
- MaxRange
- <float> Maximum distance a target can be to be attacked
- SpinMagnitude
- <float> Strength of spin in missile trajectory
- SpinSpeed
- <float> How fast does the spin rotate through 360
- Damage
- <float> How much damage does each missile do
- DamageRadius
- <float>
Flags
BaseNPC flags
- Wait Till Seen : [1]
- Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
- Gag : [2]
- Won't make IDLE sounds until it's angry.
- Fall to ground (unchecked means teleport to ground) : [4]
- Drop Healthkit : [8]
- Causes this NPC to drop an item_healthvial upon dying.
- Efficient : [16]
- Don't acquire enemies or avoid obstacles
- Wait For Script : [128]
- Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
- Long Visibility/Shoot : [256]
- By default, increases a NPC's sight range to
6,000
units and allows it to attack from anywhere within that distance.
- Fade Corpse : [512]
- Think outside PVS : [1024]
- Allows this NPC to run its regular AI outside of any player's PVS.
- Template NPC : [2048]
- Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
- Do Alternate collision for this NPC (player avoidance) : [4096]
- Don't drop weapons : [8192]
- Ignore player push : [16384] (in all games since
)
- Entity won't give way to player.
- 65536 : Check LOS
Inputs
- TurnOn
- Turn on Launcher
- TurnOff
- Turn off Launcher
- LOSCheckOn
- Start checking line of sight before firing
- LOSCheckOff
- Stop checking line of sight before firing
- SetEnemyEntity
- Set entity I should attack. Ignores visibility. (output from other entity only)
- ClearEnemyEntity
- Clear set enemy enemy
- FireOnce
- Fire Once (if have enemy)
Outputs
- OnLaunch
- Fires when missile is launched. (!activator is the enemy launched at)
Notes
The default values of the MissileModel
and FlySound
properties point to resources that do not exist. Appropriate values would be models/Weapons/W_missile.mdl
and weapons/rpg/rocket1.wav
, respectively.