Point message: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (ModernBug and ModernWarning)
Line 11: Line 11:
{{entity|point_message|type=e0}} It displays a text message in the world, at its origin.
{{entity|point_message|type=e0}} It displays a text message in the world, at its origin.


{{bug|Does not function in {{css}}, {{tf2}}, {{l4d}} and {{l4d2}}.}}
{{ModernBug|Does not function in {{css}}, {{tf2}}, {{l4d}} and {{l4d2}}.}}


{{code class|CMessageEntity|message_entity.cpp}}
{{Code class|CMessageEntity|message_entity.cpp}}




Line 21: Line 21:
== Keyvalues ==
== Keyvalues ==
{{KV|Entity Message|intn=message|string|Message to show at this point.}}
{{KV|Entity Message|intn=message|string|Message to show at this point.}}
{{warning|Never use quotation marks in the message. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}}
{{ModernWarning|Never use quotation marks in the message. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}}
{{KV|Show message radius|intn=radius|integer|Distance the player must be within to see this message.}}
{{KV|Show message radius|intn=radius|integer|Distance the player must be within to see this message.}}
{{KV|Developer Only?|intn=developeronly|boolean|If set, this message will only be visible when [[developer]] mode is on.}}
{{KV|Developer Only?|intn=developeronly|boolean|If set, this message will only be visible when [[developer]] mode is on.}}

Revision as of 05:32, 19 February 2023

English (en)Español (es)Translate (Translate)
point_message
Point message.png
TypePoint entity
EngineSource Source
AvailabilityIn all games except Counter-Strike: Source, Team Fortress 2, Left 4 Dead and Left 4 Dead 2
 

Template:Entity It displays a text message in the world, at its origin.

Template:ModernBug

C++ In code, it is represented by theCMessageEntityclass, defined in themessage_entity.cppfile.



Keyvalues

Entity Message (message) <string>
Message to show at this point.

Template:ModernWarning

Show message radius (radius) <integer>
Distance the player must be within to see this message.
Developer Only? (developeronly) <boolean>
If set, this message will only be visible when developer mode is on.


Flags

  • 1 : Start Disabled

Inputs

Enable
Start displaying the message text, if the player is within the message radius.
Disable
Stop displaying the message text.


Outputs

See also

  • game_text - Displays a custom message directly on the player screen.
  • game_text_tf - Team Fortress 2 Displays a custom HUD message with icons on a specified team's screen.
  • point_worldtext - Team Fortress 2Counter-Strike: Global Offensive A similar entity that displays a custom message in the world with far more flexibility.
  • training_annotation - Team Fortress 2 A similar entity that points to a specified location in the world.
  • env_hudhint - Displays a custom HUD message. Commonly used to show key-binds.
  • env_message - Displays a pre-defined message on the players screen.