Combine mine: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (removed the "confirm" tag for now)
Line 3: Line 3:
{{this is a|point entity|name=combine_mine|game=Half-Life 2|game1=Half-Life 2: Episode One|game2=Half-Life 2: Episode Two|game3=Half-Life 2: Deathmatch}} Known as "hoppers" by citizens, these mines embed themselves into the ground and are agitated when a hostile target gets close. If the target gets too close, the mine will retract its arms and hop towards the target (similar to a bouncing betty), exploding upon contact with any surface. These mines can be carried and deployed by [[npc_clawscanner|Claw Scanners]].
{{this is a|point entity|name=combine_mine|game=Half-Life 2|game1=Half-Life 2: Episode One|game2=Half-Life 2: Episode Two|game3=Half-Life 2: Deathmatch}} Known as "hoppers" by citizens, these mines embed themselves into the ground and are agitated when a hostile target gets close. If the target gets too close, the mine will retract its arms and hop towards the target (similar to a bouncing betty), exploding upon contact with any surface. These mines can be carried and deployed by [[npc_clawscanner|Claw Scanners]].


Mines are friendly to most types of Combine units and attack anyone who they don't regard as a friend. If a friendly NPC/player is nearby, the mine's light will turn green and may refuse to bounce unless an enemy gets closer to it than the ally.{{confirm}}
Mines are friendly to most types of Combine units and attack anyone who they don't regard as a friend. If a friendly NPC/player is nearby, the mine's light will turn green and may refuse to bounce unless an enemy gets closer to it than the ally.


Mines can be picked up by the [[weapon_physcannon|gravity gun]], after which they join the player's side and attack Combine units while regarding the player and their allies as friends.
Mines can be picked up by the [[weapon_physcannon|gravity gun]], after which they join the player's side and attack Combine units while regarding the player and their allies as friends.

Revision as of 15:34, 19 June 2024

English (en)Русский (ru)Translate (Translate)
Combine Mine
Demonstration of the first bug. Once the mine has settled, it checks what is below it. Since there's a gap in the middle, the first thing the line encounters is the world.

combine_mine is a point entity available in Half-Life 2 Half-Life 2, Half-Life 2: Episode One Half-Life 2: Episode One, Half-Life 2: Episode Two Half-Life 2: Episode Two, and Half-Life 2: Deathmatch Half-Life 2: Deathmatch. Known as "hoppers" by citizens, these mines embed themselves into the ground and are agitated when a hostile target gets close. If the target gets too close, the mine will retract its arms and hop towards the target (similar to a bouncing betty), exploding upon contact with any surface. These mines can be carried and deployed by Claw Scanners.

Mines are friendly to most types of Combine units and attack anyone who they don't regard as a friend. If a friendly NPC/player is nearby, the mine's light will turn green and may refuse to bounce unless an enemy gets closer to it than the ally.

Mines can be picked up by the gravity gun, after which they join the player's side and attack Combine units while regarding the player and their allies as friends.

Note.pngNote:combine_mine is not actually a NPC. It's technically just a basic model entity (CBaseAnimating) and doesn't use most NPC features, like relationships.
Warning.pngWarning:Zombies, headcrabs, and antlions are always targeted by mines, but combine_mine uses a hardcoded list of Combine classes to be friendly towards by default and to be armed against while friendly to the player. Some Combine classes are missing from this list, most notably npc_manhack and npc_stalker, and as a result mines will mistakenly regard them as hostile to the Combine and friendly to the player.
Cpp.pngCode Fix:This list is located in CBounceBomb::IsFriend() and can be modified to accept the missing classes or even be replaced by a more robust system.
PlacementTip.gifPlacement Tip:Like all physics objects, this entity can collide with skybox brushes, so make sure your skybox has enough room for the combine_mine to be thrown into the sky without seemingly exploding randomly. (at least ~1024 units above the ground could work)
Icon-Bug.pngBug:Mines determine if they are on solid ground by drawing a line down from their center and checking if the line hits an entity or world geometry first. This can lead to them falsely interpreting the player's head or certain physics objects (or combinations of them) as the ground, causing them to float in the air when the player/object moves.
Cpp.pngCode Fix:This can be fixed in CBounceBomb::SettleThink() by changing the trace distance from 1024 units to something much smaller, like 8.
  [todo tested in ?]
AltNames.pngAltNames: This entity is also tied to bounce_bomb and combine_bouncemine.
Note.pngNote:This entity is also in the code for Portal. Its functionality is not guaranteed.


C++ In code, it is represented by theCBounceBombclass, defined in thecombine_mine.cppfile.

Keyvalues

Bounce (bounce) ([todo internal name (i)]) <boolean>
Whether the mine should bounce up in the air before exploding. (Normally they do, to improve their damage on infantry, but things like very soft clamping surfaces and additional attachments, may make hopping look unrealistic.)
Lock Silently (LockSilently) ([todo internal name (i)]) <boolean>
Whether the mine plays a sound when its clamps close.
Start Disarmed (StartDisarmed) ([todo internal name (i)]) <boolean>
Whether the mine begins dormant.
Citizen modified (Modification) ([todo internal name (i)]) <integer>
'Normal' is default Combine behavior. 'Cavern' (used in This Vortal Coil) detonates earlier in its jump, and in Episode 2 has a different default skin.
Confirm:The skin can be added in games pre-Episode 2 as well.
Explosion Damage (ExplosionDamage) ([todo internal name (i)]) <integer> !FGD
Manually adjust damage from explosion.
Todo: When is this used? It doesn't appear in code.
Explosion Radius (ExplosionRadius) ([todo internal name (i)]) <integer> !FGD
Manually adjust range of explosion.
Todo: When is this used? It doesn't appear in code.
Explosion Delay (ExplosionDelay) ([todo internal name (i)]) <float> !FGD
Confirm:Seen in code, but doesn't appear to function?
Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history


Inputs

Disarm
Disarm this mine (open hooks and shut off) if not placed by player.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history


Outputs

OnPulledUp
Fired when this mine is uprooted with the gravity gun.
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history