Health: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added a bug i recently discovered in Gmod)
No edit summary
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{Abstract Mapping}}
{{Abstract Mapping}}
<br>
__NOTOC__
__NOTOC__
'''Health''', or '''Health Points''' ("HP", occasionally "Hit Points"), represents a character's physical status in a video game. Most [[Source]] engine games use a traditional health points system, where a character is spawned with a certain number of health points which are displayed in the [[HUD]]. Taking damage will subtract from the character's health, and the character will die when HP reaches 0. Most games offer powerups and items to restore health.
{{note|Player's or NPCs' health is not updated instantly when it's modified via <code>addoutput "health [number]"</code>. Health will update only when player or NPC receives damage or gains health. If player's or NPC's health is set to 0 or lower they will still be alive but will die in one hit from any damage source.<br>
Most NPC and player entities have a <kbd>SetHealth</kbd> input available to change their health properly, which also respects their <kbd>max_health</kbd> keyvalue.}}
Some games, such as {{Portal|2}}, use an alternative "regenerating health" scheme, where the player's health quickly regenerates when the player is not taking damage. The health may also not be displayed onscreen.


'''Health''', or '''Health Points''' (HP), represents a character's physical status in a video game. Most [[Source]] engine games use a traditional health points system, where a character is spawned with a certain number of health points which are displayed in the [[HUD]]. Taking damage will subtract from the character's health, and the character will die when HP reaches 0. Most games offer powerups and items to restore health.
While in many multiplayer games all characters start with the same amount of health, class-based games such as {{tf2|2}} sometimes assign different starting health values to different classes.
{{Bug|Sometimes when a player is in godmode in the Source engine, the player may reach 0 health but still be alive.}}
Some games, such as [[Portal]], use an alternative "regenerating health" scheme, where the player's health quickly regenerates when the player is not taking damage. The health may also not be displayed onscreen.


While in many multiplayer games all characters start with the same amount of health, class-based games such as [[Team Fortress 2]] sometimes assign different starting health values to different classes.
Following is a list of health-related articles:


Following is a list of health-related articles:
==Health Level Design==
* {{tf2}} [[TF2/Resupply Areas|Resupply areas in Team Fortress 2]]


==Health level design==
== Health Coding ==
* [[TF2/Resupply Areas|Resupply areas in Team Fortress 2]]
* [[Adding class based health differences]]
* [[Regenerating Health]]
* [[VGUI Health bar]]
* [[VGUI Image Progress Bar]]


==Health entities==
== {{src}} Source Health Entities==
=== [[Half-Life 2]], [[Episode One]] and [[Episode Two]] ===
=== {{hl2series|4}} ===
* [[func_recharge]]
* {{ent|func_recharge}}
* [[func_healthcharger]]
* {{ent|func_healthcharger}}
* [[item_battery]]
* {{ent|item_battery}}
* [[item_healthcharger]]
* {{ent|item_healthcharger}}
* [[item_healthkit]]
* {{ent|item_healthkit}}
* [[item_healthvial]]
* {{ent|item_healthvial}}
* [[item_item_crate]]
* {{ent|item_item_crate}}
* [[item_suitcharger]]
* {{ent|item_suitcharger}}
* [[npc_antlion_grub]]
* {{ent|npc_antlion_grub}}


=== [[Team Fortress 2]] ===
=== {{hls|4}} & {{hldms|4}} ===
* [[func_regenerate]]
* <code>[[func healthcharger (Half-Life: Source)|func_healthcharger]]</code>
* [[item_healthkit_full]]
* <code>[[func recharge (Half-Life: Source)|func_recharge]]</code>
* [[item_healthkit_medium]]
* <code>[[item battery (Half-Life: Source)|item_battery]]</code>
* [[item_healthkit_small]]
* <code>[[item healthkit (Half-Life: Source)|item_healthkit]]</code>
* [[obj_dispenser]]


=== [[Left 4 Dead]] ===
=== {{tf2|4}} ===
* [[prop_health_cabinet]]
* {{ent|func_regenerate}}
* [[weapon_first_aid_kit_spawn]]
* {{ent|item_healthkit_full}}
* [[weapon_defibrillator_spawn]]
* {{ent|item_healthkit_medium}}
* [[weapon_pain_pills_spawn]]
* {{ent|item_healthkit_small}}
* [[weapon_adrenaline_spawn]]
* {{ent|obj_dispenser}}


=== [[Counter-Strike: Global Offensive]] ===
=== {{l4dseries|4}} ===
* [[weapon_healthshot]]
* {{ent|prop_health_cabinet}}
* {{ent|weapon_first_aid_kit_spawn}}
* {{ent|weapon_defibrillator_spawn}}
* {{ent|weapon_pain_pills_spawn}}
* {{ent|weapon_adrenaline_spawn}}


=== [[Alien Swarm]] ===
=== {{Csgo|4}} ===
* [[asw_pickup_medkit]]
* {{ent|weapon_healthshot}}


=== [[Sin Episodes]] ===
=== {{as|4}} ===
* [[item_antigen_dispenser]]
* {{ent|asw_pickup_medkit}}
* [[item_healthvial]]
* [[item_megahealth]]
* [[prop_antigen_canister]]
* [[prop_antigen_explosive_barrel]]


=== [[The Ship]] ===
=== {{sineps|4}} ===
* [[ship_item_spawner]]
* {{ent|item_antigen_dispenser}}
* {{ent|item_healthvial}}
* {{ent|item_megahealth}}
* {{ent|prop_antigen_canister}}
* {{ent|prop_antigen_explosive_barrel}}


=== [[Dark Messiah]] ===
=== {{Ship|4}} ===
* [[item_food_banana_regime]]
* {{ent|ship_item_spawner}}
* [[item_food_banana01]]
* [[item_food_banana02]]
* [[item_food_banana03]]
* [[item_food_banana04]]
* [[item_food_bread01_cooked]]
* [[item_food_bread01_row]]
* [[item_food_chicken_roasted]]
* [[item_food_fish_hanged]]
* [[item_food_fibs_cooked]]
* [[item_food_fibs_row]]
* [[item_food_fish01]]
* [[item_food_fish02]]
* [[item_food_fish03]]
* [[item_food_food_ratio02]]
* [[item_food_garlic]]
* [[item_food_ham]]
* [[item_food_leek01]]
* [[item_food_magic_toad]]
* [[item_food_mushroom]]
* [[item_food_mushroom_verymedium]]
* [[item_food_pie]]
* [[item_food_red_apple]]
* [[item_potion_full_life]]
* [[item_potion_life]]
* [[weapon_arxringregeneration]]
* [[weapon_arxringsecondchance]]
* [[weapon_mm_helmet_health]]


=== [[Vampire The Masquerade - Bloodlines]] ===
=== {{dmmm|4}} ===
* [[item_g_bloodpack]]
* {{ent|item_food_banana_regime}}
* [[item_g_bluebloodpack]]
* {{ent|item_food_banana01}}
* [[item_g_eldervitaepack]]
* {{ent|item_food_banana02}}
* [[item_p_occult_heal_rate]]
* {{ent|item_food_banana03}}
* [[item_p_occult_regen]]
* {{ent|item_food_banana04}}
* {{ent|item_food_bread01_cooked}}
* {{ent|item_food_bread01_row}}
* {{ent|item_food_chicken_roasted}}
* {{ent|item_food_fish_hanged}}
* {{ent|item_food_fibs_cooked}}
* {{ent|item_food_fibs_row}}
* {{ent|item_food_fish01}}
* {{ent|item_food_fish02}}
* {{ent|item_food_fish03}}
* {{ent|item_food_food_ratio02}}
* {{ent|item_food_garlic}}
* {{ent|item_food_ham}}
* {{ent|item_food_leek01}}
* {{ent|item_food_magic_toad}}
* {{ent|item_food_mushroom}}
* {{ent|item_food_mushroom_verymedium}}
* {{ent|item_food_pie}}
* {{ent|item_food_red_apple}}
* {{ent|item_potion_full_life}}
* {{ent|item_potion_life}}
* {{ent|weapon_arxringregeneration}}
* {{ent|weapon_arxringsecondchance}}
* {{ent|weapon_mm_helmet_health}}


=== [[Half-Life]], [[Half-Life: Opposing Force]] and [[Half-Life: Blue Shift]] ===
=== {{vtmb|4}} ===
* [[func_healthcharge]]
* {{ent|item_g_bloodpack}}
* [[func_recharge]]
* {{ent|item_g_bluebloodpack}}
* [[item_battery]]
* {{ent|item_g_eldervitaepack}}
* [[item_healthkit]]
* {{ent|item_p_occult_heal_rate}}
* {{ent|item_p_occult_regen}}


=== [[Team Fortress Classic]] ===
== {{goldsrc}} GoldSrc health entities ==
* [[func_healthcharge]]
=== {{hl|4}}, {{hlop4|4}}, {{hlbs|4}} ===
* [[item_healthkit]]
* {{ent|func_healthcharger|engine=goldsrc}}
* {{ent|func_recharge|engine=goldsrc}}
* {{ent|item_battery|engine=goldsrc}}
* {{ent|item_healthkit|engine=goldsrc}}
* {{ent|func_door|engine=goldsrc}}/{{ent|func_door_rotating|engine=goldsrc}} ({{mono|healthvalue}} KV)


== Health coding ==
=== {{tfc|4}} ===
*[[Adding class based health differences]]
* {{ent|func_healthcharger|engine=goldsrc}}
*[[Regenerating Health]]
* {{ent|item_healthkit|engine=goldsrc}}
*[[VGUI Health bar]]


[[Category:Hubs]]
[[Category:Hubs]]
[[Category:Abstract Mapping]]

Latest revision as of 07:29, 22 June 2025

English (en)中文 (zh)Translate (Translate)
Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | List of HL2 Animals and Creatures | Mapping with Antlions | Beams and Lasers | Cables and Ropes | Moving Clouds | Color Theory in Level Design | Combat | Combine | Compression (Source 1) | Doors | Dust, Fog, & Smoke | Elevators | Level Transitions | Environmental Lighting, Sun, Weather, & Outdoors | Explosions | Fire | Half-Life 2 Foliage | Glass & Windows | Headcrab | Health | Ladders | Lighting | Optimization (level design) | Physics | Retinal scanners | Sound and Music | Special effects | Terrain | Trains | Turrets | Water | Weapons | Zombie


Health, or Health Points ("HP", occasionally "Hit Points"), represents a character's physical status in a video game. Most Source engine games use a traditional health points system, where a character is spawned with a certain number of health points which are displayed in the HUD. Taking damage will subtract from the character's health, and the character will die when HP reaches 0. Most games offer powerups and items to restore health.

Note.pngNote:Player's or NPCs' health is not updated instantly when it's modified via addoutput "health [number]". Health will update only when player or NPC receives damage or gains health. If player's or NPC's health is set to 0 or lower they will still be alive but will die in one hit from any damage source.
Most NPC and player entities have a SetHealth input available to change their health properly, which also respects their max_health keyvalue.

Some games, such as Portal Portal, use an alternative "regenerating health" scheme, where the player's health quickly regenerates when the player is not taking damage. The health may also not be displayed onscreen.

While in many multiplayer games all characters start with the same amount of health, class-based games such as Team Fortress 2 Team Fortress 2 sometimes assign different starting health values to different classes.

Following is a list of health-related articles:

Health Level Design

Health Coding

Source Source Health Entities

Half-Life 2 series Half-Life 2 series

Half-Life: Source Half-Life: Source & Half-Life Deathmatch: Source Half-Life Deathmatch: Source

Team Fortress 2 Team Fortress 2

Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series

Counter-Strike: Global Offensive Counter-Strike: Global Offensive

Alien Swarm Alien Swarm

SiN Episodes SiN Episodes

The Ship: Murder Party The Ship: Murder Party

Dark Messiah of Might and Magic Dark Messiah of Might and Magic

Vampire: The Masquerade – Bloodlines Vampire: The Masquerade – Bloodlines

GoldSrc GoldSrc health entities

Half-Life Half-Life, Half-Life: Opposing Force Half-Life: Opposing Force, Half-Life: Blue Shift Half-Life: Blue Shift

Team Fortress Classic Team Fortress Classic