Trigger weaponfire: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{this is a|brush entity|name=trigger_weaponfire|game=Black Mesa}} It is a volume that fires outputs when an entity with <code>grenade_</code> prefix ({{ent|grenade_mp5_contact}}, {{ent|grenade_bolt}}, {{ent|grenade_hornet}}, etc.) enters or leaves it. This is the only {{ent|trigger}} entity which reacts to entities of this type (other ignore or doesn't work with most of them).
{{CDA|CTriggerWeaponFire|CBaseTrigger|CBaseToggle|CBaseEntity|}}
 
{{this is a|brush entity|name=trigger_weaponfire|game=Black Mesa}} It is a volume that fires outputs when an entity with <code>grenade_</code> prefix ({{ent|grenade_mp5_contact}}, {{ent|grenade_bolt}}, {{ent|grenade_hornet}}, etc.) enters or leaves it. This is the only {{ent|trigger}} entity which can be triggered by these entities (most other doesn't work). Original [[FGD]] also provides all the flags from {{ent|trigger_multiple}} entity, but none of them will work with this entity.
All properties, inputs and outputs are same as {{ent|trigger_multiple}}. Original [[FGD]] also provides all the flags, but none of them will work with this entity.


This entity is very useful for cases, when you need to fire outputs when specified grenade touches trigger. This entity is also useful when you need to do something with specified grenade entity, for example, this is the only way to set right skin for crossbow bolts in multiplayer (for some reason crossbow bolts in multiplayer use the green skin texture when they should use the red skin).
This entity is very useful for cases, when you need to fire outputs when specified grenade touches trigger. This entity is also useful when you need to do something with specified grenade entity, for example, this is the only way to set right skin for crossbow bolts in multiplayer (for some reason crossbow bolts in multiplayer use the green skin texture when they should use the red skin).
Represented by class <code>CTriggerWeaponFire</code>.

Latest revision as of 06:42, 27 May 2025

C++ Class hierarchy
CTriggerWeaponFire
CBaseTrigger
CBaseToggle
CBaseEntity

trigger_weaponfire is a brush entity available in Black Mesa Black Mesa. It is a volume that fires outputs when an entity with grenade_ prefix (grenade_mp5_contact, grenade_bolt, grenade_hornet, etc.) enters or leaves it. This is the only trigger entity which can be triggered by these entities (most other doesn't work). Original FGD also provides all the flags from trigger_multiple entity, but none of them will work with this entity.

This entity is very useful for cases, when you need to fire outputs when specified grenade touches trigger. This entity is also useful when you need to do something with specified grenade entity, for example, this is the only way to set right skin for crossbow bolts in multiplayer (for some reason crossbow bolts in multiplayer use the green skin texture when they should use the red skin).