upgrade_spawn
Jump to navigation
Jump to search
| CUpgradeSpawner |
upgrade_spawn is a point entity available in
Left 4 Dead 2. It is a configurable spawner for weapon upgrades.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report. - See also: Generic Keyvalues, Inputs and Outputs available to all entities
Important:If you want to use this upgrade position only in a specific gamemode, for example coop, then you must use point_template and fire ForceSpawn to it from info_gamemode's OnCoop output. Attempting to do it the other way around, like sending the Kill input to this entity in OnVersus, won't work because this entity is, upon spawning, immediately converted to one of the specific weapon upgrade entities that were picked and targetname isn't transferred.
- Laser Sight (laser_sight) <boolean>
- UpgradePack - Incendiary (upgradepack_incendiary) <boolean>
- UpgradePack - Explosive (upgradepack_explosive) <boolean>
- If set to 1, the given upgrade might spawn.
Flags
- Enable Physics on spawned item : [1]
- Spawned Item Must Exist : [2]
Optional FGD edits, for better usability
This entity will spawn a random chosen upgrade, yet you cannot decide its exact rotation. To fix this, modify "Left 4 Dead 2\bin\left4dead2.fgd".
Search for
@PointClass base(Targetname) = upgrade_spawn
and modify it as such:
@PointClass base(Targetname, Angles)studioprop() = upgrade_spawn [ laser_sight(integer) : "Laser Sight" : 1 upgradepack_incendiary(integer) : "UpgradePack - Incendiary" : 1 upgradepack_explosive(integer) : "UpgradePack - Explosive" : 1 spawnflags(Flags) = [ 1 : "Enable Physics on spawned item" : 0 2 : "Spawned Item Must Exist" : 0 ] model(choices) : "Helper Model (Visual aid only)" : "models/w_models/weapons/w_laser_sights.mdl" = [ "models/w_models/weapons/w_laser_sights.mdl" : "Laser" "models/w_models/weapons/w_eq_explosive_ammopack.mdl" : "Explosive Ammo" "models/w_models/weapons/w_eq_incendiary_ammopack.mdl" : "Incendiary Ammo" ] ]