Upgrade laser sight: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added FGD instructions.)
m (Classifying as model entity)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{ent not in fgd}}
{{CD|CUpgradeLaserSight}}
 
{{this is a|model entity|name=upgrade_laser_sight|game=Left 4 Dead 2}}<br>
{{l4d2 point|Upgrade_laser_sight}}<br>
This entity will directly spawn a box of laser sights, on which you can pick the rotation precisely. The usual spawn entity [[upgrade_spawn]] would not allow you to do so.<br>
This entity will directly spawn a box of laser sights, on which you can pick the rotation precisely. The usual spawn entity [[upgrade_spawn]] would not allow you to do so.<br>


==FGD Code==
== See Also ==
To add this entity to the FGD, and to use it in [[Hammer]], add the following lines to the left4dead2.FGD (or any custom FGD, loaded by Hammer).
* {{ent|upgrade_ammo_incendiary}}
<pre>@PointClass base(WeaponSpawnSingle) studioprop("models/w_models/weapons/w_laser_sights.mdl") = upgrade_laser_sight : "Deployed Upgrade Pack - Laser" []
* {{ent|upgrade_ammo_explosive}}
</pre>
* {{ent|upgrade_spawn}}

Latest revision as of 04:35, 19 May 2025

C++ Class hierarchy
CUpgradeLaserSight
CBaseUpgradeItem
CWeaponSpawn
CItem
CBaseAnimating
CBaseEntity

upgrade_laser_sight is a model entity available in Left 4 Dead 2 Left 4 Dead 2.
This entity will directly spawn a box of laser sights, on which you can pick the rotation precisely. The usual spawn entity upgrade_spawn would not allow you to do so.

See Also