Npc grenade frag: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Changed because it dont fit with the Entity Article Template, added descriptions.)
No edit summary
 
(11 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{hl2 point|npc_grenade_frag}}
{{CD|CGrenadeFrag|file1=grenade_frag.cpp}}
{{this is a|model entity|name=npc_grenade_frag|game=Half-Life 2 series}} It is the about-to-explode version of [[weapon_frag]] created when thrown.


npc_grenade_frag is the entity that represents an active grenade ([[weapon_frag]] thrown by a player or NPC) in-game.
== Keyvalues ==
{{KV Targetname}}
 
== Inputs ==
{{I|SetTimer|This input makes the grenade live, and specifies how many seconds before it explodes.|param=float}}
 
{{Note|Default [[Half-Life_2.fgd|FGD]] mistakenly gave this BaseNPC Keyvalues/Inputs/Outputs}}


== Dedicated Console Variables ==
== Dedicated Console Variables ==
;sk_plr_dmg_fraggrenade <[[int]]>
;sk_plr_dmg_fraggrenade <[[int]]>
: Demage of the grenade if used by the Player (Default: 150).
: Damage of grenades thrown by the player.
;sk_npc_dmg_fraggrenade <[[int]]>
;sk_npc_dmg_fraggrenade <[[int]]>
: Given demage by the grenade (Default: 75).
: Damage of grenades thrown by NPCs.
;sk_fraggrenade_radius <[[int]]>
;sk_fraggrenade_radius <[[int]]>
: Demage radius of the grenade (Default: 250).
: Explosion size (default 250).
 
== Keyvalues ==
*{{KV BaseNPC}}
== Flags ==
*{{Fl BaseNPC}}
== Inputs ==
*; SetTimer <float>
: This input makes the grenade live, and specifies how many seconds before it explodes.
*{{I BaseNPC}}
== Outputs ==
*{{O BaseNPC}}


[[Category:Half-Life 2 NPCs]]
[[Category:Half-Life 2 NPCs|G]]
{{immobile npc}}
{{immobile npc}}

Latest revision as of 08:20, 26 May 2025

C++ Class hierarchy
CGrenadeFrag
CBaseGrenade
CBaseProjectile
CBaseAnimating
CBaseEntity
C++ grenade_frag.cpp

npc_grenade_frag is a model entity available in Half-Life 2 series Half-Life 2 series. It is the about-to-explode version of weapon_frag created when thrown.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

SetTimer <floatRedirectInput/float>
This input makes the grenade live, and specifies how many seconds before it explodes.
Note.pngNote:Default FGD mistakenly gave this BaseNPC Keyvalues/Inputs/Outputs

Dedicated Console Variables

sk_plr_dmg_fraggrenade <int>
Damage of grenades thrown by the player.
sk_npc_dmg_fraggrenade <int>
Damage of grenades thrown by NPCs.
sk_fraggrenade_radius <int>
Explosion size (default 250).