grenade_frag

From Valve Developer Community
Jump to navigation Jump to search
Info.png
This entity is not in the FGD by default.
It should not be put directly in a map because it can only be configured through code in Steam versions of the game. In the mod version, you still use it for rare cases, but it's more easy to use an exploadable prop.
Granede frag.png

grenade_frag is a point entity available in Black Mesa Black Mesa. The grenade entity that used by weapon_frag and HECU soldiers. It is a frag grenade that explodes after a certain amount of time, it also uses VPhysics, so you can pick it up and throw it like any other physical object. In multiplayer, used QPhysics (similar to Half-Life Half-Life and Counter-Strike 2 Counter-Strike 2), so you can't pick up it, but it has a predictable throw path. Steam versions use console variables to configure this entity, the mod version provides exclusive inputs and outputs that are cut in Steam versions of the game. Other inputs and outputs are same as CBaseAnimating.

Represented by class CGrenade_Frag.

Icon-Bug.pngBug:Level transition will break the detonation timer, causing this entity to never explode.
Icon-Bug.pngBug:In multiplayer, if a player dies while cooking frag and before throwing it, it will create a frag that will never disappear, it will also collide with other players.
Icon-Bug.pngBug:Particles disappear after save loading.
Icon-Bug.pngBug:This entity will never explode if spawned via Hammer Hammer or ent_create grenade_frag (not in Black Mesa).
Note.pngNote:Particles from this entity are different in mod and Steam versions.
Example.


Inputs

SetTimer <float> (only in Black Mesa)
Sets amount of time before detonate. Fires with 2.985 value when a player throw a frag.
Detonate <void> (only in Black Mesa)
Detonates frag.
SetThrower <void> (only in Black Mesa)
Fired by this entity when throwed. Doesn't do anything.

Outputs

OnDetonate <void> (only in Black Mesa)
Fired by this entity when detonated.

Dedicated ConVars

Black Mesa Black Mesa

Cvar/CommandParameters or default valueDescriptorEffect
sk_detenator_frag_fuse_time3FloatAmount of time before before detonate.
sk_detenator_frag_throw_forward_speed_primary750FloatThrow forward speed for primary attack.
sk_detenator_frag_throw_up_speed_primary255FloatThrow up speed for primary attack.
sk_detenator_frag_throw_forward_speed_secondary500FloatThrow forward speed for secondary attack.
sk_detenator_frag_throw_up_speed_secondary100FloatThrow up speed for secondary attack.
sk_detenator_frag_plr_dmg100FloatAmount of damage from player's frag.
sk_detenator_frag_plr_dmg_radius250FloatDamage radius from player's frag.
sk_detenator_frag_npc_dmg60FloatAmount of damage from NPC's frag.
sk_detenator_frag_npc_dmg_radius200FloatDamage radius from NPC's frag.
sk_detenator_frag_elasticity0.45FloatFrag's elasticity or how hard does it bounce. Multiplayer only.
sk_detenator_frag_gravity400FloatGravity scale for frag. Multiplayer only.
sk_detenator_frag_friction0.2FloatFriction scale for frag. Doesn't work.

Black Mesa Black Mesa (the mod version)

Cvar/CommandParameters or default valueDescriptorEffect
sk_plr_dmg_grenade_frag100FloatAmount of damage from player's frag.
sk_npc_dmg_grenade_frag50FloatAmount of damage from NPC's frag.

See Also