Env mine: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{ent not in fgd|nolink=1}}
{{CDA|CEnv_Mine|CBaseAnimating|CBaseEntity|}}
{{this is a|point entity|name=env_mine|game=Black Mesa}} This is {{WP|Anti-Personnel Mine}} that was used by [[HECU]] to mine some areas where many [[npc_headcrab|headcrabs]] hide under sand. Attempt to touch or damage this entity will cause detonation. Not in original [[FGD]] due to presence of {{ent|func_minefield}}, you still can add it by your hand (or just use [https://github.com/MyGamepedia/Enhanced-Black-Mesa-FGD/ Enhanced Black Mesa FGD]).
{{ent not in fgd|none}}
[[File:mineimage.png|250px|right]]
{{this is a|model entity|name=env_mine|game=Black Mesa}} This is {{WP|Anti-Personnel Mine}} that was used by [[HECU]] to mine some areas where many [[npc_headcrab|headcrabs]] hide under sand. Attempt to touch or damage this entity will cause detonation. Not in original [[FGD]] due to presence of {{ent|func_minefield}}, you still can add it by your hand (or just use [https://github.com/MyGamepedia/Enhanced-Black-Mesa-FGD/ Enhanced Black Mesa FGD]).
 
{{warning|You may need to use other entity as [[lighting origin]], because {{ent|env_mine}} usually placed underground.}}
{{warning|You may need to use other entity as [[lighting origin]], because {{ent|env_mine}} usually placed underground.}}
{{bug|Never solid.}}
{{bug|hidetested=1|Never solid, which means bullets will crate decals through it, will not crate sparks with metal sound.}}
{{bug|Doesn't work with most '''item_''' and '''weapon_''' entities.}}
{{bug|hidetested=1|Can't be exploded with most '''item_''' and '''weapon_''' entities.}}
{{bug|Doesn't explode if another mine is detonated nearby.}}
{{bug|hidetested=1|Doesn't explode if another mine is detonated nearby.}}
 
== Inputs ==
{{I|Detonate|param=void|Detonates the mine.}}


==Dedicated [[ConVars]]==
==Dedicated [[ConVars]]==
{{varcom|start}}
{{varcom|start}}
{{varcom|sk_mine_damage|50|arbitrary number|Explosion damage.}}
{{varcom|sk_mine_damage|50|[[Float]]|Explosion damage.}}
{{varcom|sk_mine_damage_radius|128|arbitrary number|Explosion damage radius.}}
{{varcom|sk_mine_damage_radius|128|Float|Explosion damage radius.}}
{{varcom|sk_mine_bounds_xy|24|arbitrary number|Sets bounds in which mine will explode along X and Y axis. Similar to [[bounding box]].}}
{{varcom|sk_mine_bounds_xy|24|Float|Sets bounds in which mine will explode along X and Y axis. Similar to [[bounding box]].}}
{{varcom|sk_mine_bounds_z|64|arbitrary number|Sets bounds in which mine will explode along Z axis. Similar to [[bounding box]].}}
{{varcom|sk_mine_bounds_z|64|Float|Sets bounds in which mine will explode along Z axis. Similar to [[bounding box]].}}
{{varcom|end}}
{{varcom|end}}
==Keyvalues==
{{KV|[[Skin]]|intn=skin|int|Some models have multiple skins. This value selects from the index, starting with 0.}}
{{KV|Collisions|intn=solid|choices|Method of collision for this entity.<!--
-->{{Expand|title=Choices|margin_left=2em|
:*'''0''': None
:*'''1''': BSP ([[QPhysics]])
:*'''2''': [[Bounding box|Bounding Box]]
:*'''3''': Oriented Bounding Box (Use for runtime spawned rotated brush entities)
:*'''4''': Oriented Bounding Box, constrained to [[QAngle|Yaw]] only
:*'''5''': Custom/Test (Usually no collision with anything)
:*'''6''': [[VPhysics]]}}
}}
{{KV|[[Hitbox]] Set|intn=hitboxset|string|Sets the {{Ent|$hboxset}} to use.}}
{{KV|Body Group|intn=body or SetBodyGroup|int|Sets the the active {{Ent|$bodygroup}}.}}
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the <code>cl_precacheinfo modelprecache</code> table, sets entity model to the index. {{warning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}}
{{KV|Model Scale|intn=modelscale|float|A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however.{{warning|Negative or extremely high values can cause crashes!}}{{note|Scale may not appear in {{hammer4|2}}, but will appear in-game (tested in {{dods}}). This is fixed in {{hammer++|2}}.}}|since=EP2}}
{{KV|Texture Frame|intn=texframeindex|int|The initial frame number for all animated textures on this entity.|nofgd=1}}
{{KV|Start Fade Distance|intn=fademindist|float|Distance at which the entity starts fading. If 0 or less, the entity will disappear instantly when end fade is hit. The value will scale appropriately if the entity is in a [[3D Skybox]].}}
{{KV|End Fade Distance|intn=fademaxdist|float|Distance at which the entity ends fading. If 0 or less, the entity won't disappear at all. The value will scale appropriately if the entity is in a 3D Skybox.}}
{{KV|Fade Scale|intn=fadescale|float|If specified in the {{Ent|worldspawn}}, or if the engine is running below DirectX 8, entities will fade out even if the fade distances above aren't specified. This value gives more control over when this happens: numbers smaller than 1 cause the entity to fade out at further distances, and greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also {{Ent|$noforcedfade}}.}}
{{KV|FX Amount/Transparency (0–255)|intn=renderamt|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.}}
{{KV|Render Color (R G B)|intn=rendercolor|color255|Color tint.}}
{{KV Render FX}}
{{KV Rendermode}}
{{KV|Disable Shadows|intn=disableshadows|boolean|Prevent the entity from creating cheap render-to-texture shadows. Does not affect [[shadow mapping]].}}
{{KV|Disable Receiving Shadows|intn=disablereceiveshadows|boolean|Prevent the entity from receiving shadows on itself.}}
{{KV|Lighting Origin|intn=LightingOrigin|targetname|Select an entity (not {{Ent|info_lighting}}!) from which to sample lighting instead of the entity's [[origin]].}}
{{KV|Lighting Origin Offset|intn=LightingOriginHack|targetname|The {{Ent|info_lighting_relative}} from which to sample lighting instead of the entity's origin. Use <tt>Lighting Origin</tt> instead.|deprecated=1}}
{{KV BaseEntity|base=1}}

Latest revision as of 23:58, 26 May 2025

C++ Class hierarchy
CEnv_Mine
CBaseAnimating
CBaseEntity
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
Mineimage.png

env_mine is a model entity available in Black Mesa Black Mesa. This is Wikipedia icon Anti-Personnel Mine that was used by HECU to mine some areas where many headcrabs hide under sand. Attempt to touch or damage this entity will cause detonation. Not in original FGD due to presence of func_minefield, you still can add it by your hand (or just use Enhanced Black Mesa FGD).

Warning.pngWarning:You may need to use other entity as lighting origin, because env_mine usually placed underground.
Icon-Bug.pngBug:Never solid, which means bullets will crate decals through it, will not crate sparks with metal sound.
Icon-Bug.pngBug:Can't be exploded with most item_ and weapon_ entities.
Icon-Bug.pngBug:Doesn't explode if another mine is detonated nearby.

Inputs

Detonate <void>
Detonates the mine.

Dedicated ConVars

Cvar/Command Parameters or default value Descriptor Effect
sk_mine_damage 50 Float Explosion damage.
sk_mine_damage_radius 128 Float Explosion damage radius.
sk_mine_bounds_xy 24 Float Sets bounds in which mine will explode along X and Y axis. Similar to bounding box.
sk_mine_bounds_z 64 Float Sets bounds in which mine will explode along Z axis. Similar to bounding box.