This article relates to the game "Half-Life 2". Click here for more information.

Crossbow bolt: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(14 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{ent||crossbow_bolt}}
{{LanguageBar}}{{HL2 topicon}}
This is the projectile fired by [[weapon_crossbow]].
{{TabsBar|main=Crossbow bolt}}
{{stub}}
{{Ent not in fgd|nolink=1}}
{{CD|CCrossbowBolt|base=CBaseCombatCharacter|file1=weapon_crossbow.cpp}}
{{this is a|model entity|name=crossbow_bolt|game=Half-Life 2 series|game1=Portal|game2=Source SDK Bases}}


The code for this entity is found in ==weapon_crossbow.cpp==.
This is the projectile fired by {{ent|weapon_crossbow}}.


The bolts think() and ''touch()''. It is
{{note|Uses model <code>models/crossbow_bolt.mdl</code>}}


In touch() logic for bolt behavior.
== Overview ==
 
*Bolt Reflection
The bolt can reflect if the angle is shallow enough, its gravity will increase at each bounce, making the bolt slow down. It will pass directly through [[glass|func_breakable_surf]]. If the currently loaded map is <code>ep2_outland_10</code>, the bolt will pass through [[Alyx]], instead of getting deleted because of the friendly fire mechanic.
if the angle is right, bolts hit a solid surface and ricochet/reflect at an angle. Each bounce increases the 'gravity' of the projectile, in effect slowing its rate.
 
* behavior for impact against NPCs
{{bug|hidetested=1|Because the bolt has the ability to "pin" ragdolls and that it acts like a bullet (it can go through fences, for instance), ragdolls pinned agains a fence (or anything with <code>CONTENTS_GRATE</code> will try to get pinned to a bolt that is too far away, and will create unstable physics.}}
* skin change
 
* breaking glass
== See also ==
* damage to triggers/breakable/props
* {{ent|weapon_crossbow}}

Latest revision as of 12:41, 28 May 2025

English (en)Translate (Translate)
Source Engine ( General | Half-Life: Source | Black Mesa )
edit

Stub

This article or section is a stub. You can help by expanding it.

Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map.
C++ Class hierarchy
CCrossbowBolt
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ weapon_crossbow.cpp

crossbow_bolt is a model entity available in Half-Life 2 series Half-Life 2 series, Portal Portal, and Source SDK BasesSource SDK BasesSource SDK Bases Source SDK Bases.

This is the projectile fired by weapon_crossbow.

Note.pngNote:Uses model models/crossbow_bolt.mdl

Overview

The bolt can reflect if the angle is shallow enough, its gravity will increase at each bounce, making the bolt slow down. It will pass directly through func_breakable_surf. If the currently loaded map is ep2_outland_10, the bolt will pass through Alyx, instead of getting deleted because of the friendly fire mechanic.

Icon-Bug.pngBug:Because the bolt has the ability to "pin" ragdolls and that it acts like a bullet (it can go through fences, for instance), ragdolls pinned agains a fence (or anything with CONTENTS_GRATE will try to get pinned to a bolt that is too far away, and will create unstable physics.

See also