Item suit: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added flag description and provided instructions for a simple suit song.)
m (Classifying as model entity)
 
(67 intermediate revisions by 31 users not shown)
Line 1: Line 1:
{{wrongtitle|title=item_suit}}
{{LanguageBar}}
==Entity Description==
{{TabsBar|main=item_suit}}
[[Image:item_suit.jpg|frame|right|HEV Suit]]
{{CD|CItemSuit|file1=item_suit.cpp}}
This item gives the HEV suit to players.
[[File: item_suit.png | right | 300px]]


This entity will collide with the floor if placed directly on it, so be sure to place it one or more units ''above'' the ground, or it will not be there in-game.
{{This is a|model entity|name=item_suit|game=Half-Life 2 series|game1=Portal series|game2=Source SDK Bases}}<br>
This represents the Mark V Hazardous Environment Suit, Aka HEV-Suit, when not being worn by the player. It is an upgraded version of the Mark IV suit that [[Black Mesa Research Facility|Black Mesa]] employees were required to wear when handling anomalous materials (in [[Half-Life]]).<br>
This is only a pickup to enable suit charging and the [[HUD]] (<code>EquipSuit()</code>).
__NOTOC__


===Suit Song===
{{ModernPlacementTip|This entity should be placed at least one unit above the ground, or it will not be visible in-game.}}
When Gordon Freeman enters his suit in [[Half-Life 2]] a small tune starts playing. Here is how to set this up:
{{note|This entity is also available in {{portal2|4}}, but most of the functions are disabled or do not work at all, including the HUD. You can still charge armor.}}
* If you haven't already, create the <code>item_suit</code> entity.
{{Important|hidetested=1|{{hl2ep1|4}} swaps the original texture ({{Path|materials/models/hevsuit/hevsuit_sheet|vtf}}) with a very downscaled 32x32 texture (presumably to save VRAM usage, since it never is visible in the vanilla campaign). {{hl2ep2|4}} also uses it, due to the gameinfo mounting the EP1 content as well.{{fix|Pack the original textures into a mod, to be used in the episode's "Custom folder".<br>Alternatively, mods downloaded from the Steam Workshop will overwrite the models of all game versions, circumventing this issue.}}}}
* Create an <code>ambient_generic</code> preferably somewhere near the suit.
==Suit sounds==
* Open it's properties and name the entity. (This example will name it "SuitSong".)
When player receives damage, mechanical voice speaks and suit starts beeping. Suit responds to various kinds of damage including blood loss from bullets, fall from height, slashes from [[npc_zombie|zombies]] and bites from [[npc_headcrab_black|poisonous headcrabs]].
* Select a song for its ''Sound Name'' property. The song used in Half-Life 2 is called ''song_trainstation_05_suit'' (''music/hl1_song11.mp3''), but there is apparently also a tune called ''song23'' (''music/hl2_song23_suitsong3.mp3'') that judging by its name looks like it was intended for the HEV suit.
 
* Check the ''Play everywhere'' flag so that all its three flags are checked.
The volume of these sounds can be controlled with [[float]] [[console variable]] {{code|suitvolume}}. Accepted values range from 0 to 1. Set to 0 to mute suit sounds completely.
* Click on the <code>item_suit</code> and create an Output called: "OnPlayerTouch SuitSong PlaySound"
 
===Suit Jingle===
When [[Dr. Gordon Freeman]] enters his suit in [[Half-Life 2]], a small tune starts playing.
 
To set this up, have the <code>item_suit</code> output <code>OnPlayerTouch</code> target an {{ent|ambient_generic}} that's placed close to the suit with the input <code>PlaySound</code>.
 
The song used in Half-Life 2 is called [[List of Half-Life 2 music|'''song_trainstation_05_suit''']] ({{file|music/hl1_song11|mp3}}), but there is apparently also a tune called [[List of Half-Life 2 music|'''song23''']] ({{file|music/hl2_song23_suitsong3|mp3}}) that, judging by its name, was intended for the HEV suit.


==Keyvalues==
* {{kv item}}
==Flags==
==Flags==
* 1 : Short Logon
{{fl|1|Short Logon (Deprecated)|When checked, doesn't play the logon (<code>hl1/fvox/bell.wav</code>) sound. In Half-Life, this flag was used to cut the HEV suit's long logon speech, but was cut from Half-Life 2 along with many HEV voicelines. (Dr. Kleiner replaced the feature with a short bell)}}
:When checked, doesn't play the logon (''hl1/fvox/bell.wav'') sample. (In [[Half-Life]] this flag was used to cut the HEV suits long logon speech, but Dr. Kleiner apparently replaced it with a simple bell sound while upgrading it.)
 
==Inputs==
* {{i item}}
==Outputs==
==Outputs==
* {{o item}}
{{O Item}}
[[Category:Entities]] [[Category:Items]]
{{bug|<code>OnCacheInteraction</code> is non-functional.}}
 
[[Category:Items]]

Latest revision as of 04:32, 19 May 2025

English (en)Translate (Translate)
edit
C++ Class hierarchy
CItemSuit
CItem
CBaseAnimating
CBaseEntity
C++ item_suit.cpp
Item suit.png

item_suit is a model entity available in Half-Life 2 series Half-Life 2 series, Portal series Portal series, and Source SDK BasesSource SDK BasesSource SDK Bases Source SDK Bases.
This represents the Mark V Hazardous Environment Suit, Aka HEV-Suit, when not being worn by the player. It is an upgraded version of the Mark IV suit that Black Mesa employees were required to wear when handling anomalous materials (in Half-Life).
This is only a pickup to enable suit charging and the HUD (EquipSuit()).


PlacementTip.gifPlacement Tip:This entity should be placed at least one unit above the ground, or it will not be visible in-game.
Note.pngNote:This entity is also available in Portal 2 Portal 2, but most of the functions are disabled or do not work at all, including the HUD. You can still charge armor.
Icon-Important.pngImportant:Half-Life 2: Episode One Half-Life 2: Episode One swaps the original texture (🖿materials/models/hevsuit/hevsuit_sheet.vtf) with a very downscaled 32x32 texture (presumably to save VRAM usage, since it never is visible in the vanilla campaign). Half-Life 2: Episode Two Half-Life 2: Episode Two also uses it, due to the gameinfo mounting the EP1 content as well.
Note.pngFix:Pack the original textures into a mod, to be used in the episode's "Custom folder".
Alternatively, mods downloaded from the Steam Workshop will overwrite the models of all game versions, circumventing this issue.

Suit sounds

When player receives damage, mechanical voice speaks and suit starts beeping. Suit responds to various kinds of damage including blood loss from bullets, fall from height, slashes from zombies and bites from poisonous headcrabs.

The volume of these sounds can be controlled with float console variable suitvolume. Accepted values range from 0 to 1. Set to 0 to mute suit sounds completely.

Suit Jingle

When Dr. Gordon Freeman enters his suit in Half-Life 2, a small tune starts playing.

To set this up, have the item_suit output OnPlayerTouch target an ambient_generic that's placed close to the suit with the input PlaySound.

The song used in Half-Life 2 is called song_trainstation_05_suit (🖿music/hl1_song11.mp3), but there is apparently also a tune called song23 (🖿music/hl2_song23_suitsong3.mp3) that, judging by its name, was intended for the HEV suit.

Flags

Short Logon (Deprecated) : [1]
When checked, doesn't play the logon (hl1/fvox/bell.wav) sound. In Half-Life, this flag was used to cut the HEV suit's long logon speech, but was cut from Half-Life 2 along with many HEV voicelines. (Dr. Kleiner replaced the feature with a short bell)

Outputs

Item:

OnPlayerTouch
Fires when the player touches this item. !activator is the player.
OnCacheInteraction
This output fires when the player proves they have "found" this item.
Fires on:
  • Player Touch (whether or not player actually acquires the item).
  • Picked up by +use.
  • Picked up by gravity gun.
  • Punted by gravity gun.
Icon-Bug.pngBug:OnCacheInteraction is non-functional.  [todo tested in ?]