env_message

From Valve Developer Community

Jump to: navigation, search

This is a point entity available in all Source games.

Contents

Entity Description

An entity that draws a text message on player's HUD (or players' HUD's), predefined in the hl2/scripts/titles.txt file, packed inside the Steam/SteamApps/source engine.gcf.

This text can be formatted in many different ways, according to the syntax provided in the titles.txt file.

To do: Explain this syntax.

If you make a standalone modification, you can of course alter this file, but as default, titles.txt contains 23 messages. Some of these tokens seems to contain pointers to any hl2/resource/hl2_%language%.txt file packed inside the Steam/SteamApps/source engine.gcf file.

Message Value Printed Text
CR1Testing 1
CR2Testing 2
CR3Testing 3
GAMEOVER_ALLYASSIGNMENT: TERMINATED

SUBJECT: FREEMAN

REASON: FAILURE TO PRESERVE MISSION-CRITICAL PERSONNEL

GAMEOVER_OBJECTASSIGNMENT: TERMINATED

SUBJECT: FREEMAN

REASON: FAILURE TO PRESERVE MISSION-CRITICAL RESOURCES

GAMEOVER_TIMERASSIGNMENT: TERMINATED

SUBJECT: FREEMAN

REASON: FAILURE TO PREVENT TIME-CRITICAL SEQUENCE

GAMEOVER_STUCKASSIGNMENT: TERMINATED

SUBJECT: FREEMAN

REASON: DEMONSTRATION OF EXCEEDINGLY POOR JUDGMENT

CHAPTER1_TITLEPOINT INSERTION
CHAPTER2_TITLE"A RED LETTER DAY"
CHAPTER3_TITLEROUTE KANAL
CHAPTER4_TITLEWATER HAZARD
CHAPTER5_TITLEBLACK MESA EAST
CHAPTER6_TITLE"WE DON'T GO TO RAVENHOLM..."
CHAPTER7_TITLEHIGHWAY 17
CHAPTER8_TITLESANDTRAPS
CHAPTER9_TITLENOVA PROSPEKT
CHAPTER9A_TITLEENTANGLEMENT
CHAPTER10_TITLEANTICITIZEN ONE
CHAPTER11_TITLE"FOLLOW FREEMAN!"
CHAPTER12_TITLEOUR BENEFACTORS
CHAPTER13_TITLEDARK ENERGY
GAMESAVEDSaved...
GAMETITLEHalf-Life

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • message
<string>
  • messagesound
<sound> When the message is shown, this sound effect will be played, originating from this entity.
  • messagevolume
<string> Volume of the sound effect.
  • messageattenuation
<choices>
Literal Value Description
0 Small Radius
1 Medium Radius
2 Large Radius
3 Play Everywhere

Flags

  • 1 : Play Once
  • 2 : All Clients

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • ShowMessage
Shows the message and plays the sound.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • OnShowMessage
Fired when the message is activated. (activator is the activator)

Also See

  • game_text - Similar entity that lets you define a text directly in the Hammer editor.
  • env_hudhint - Similar entity that displays predefined HUD hints about controls and other things.
Personal tools