Point message: Difference between revisions
Jump to navigation
Jump to search
Bug:Does not function in
,
and
. [todo tested in ?]
Gatelych83 (talk | contribs) mNo edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
{{in code|class=class_c_message_entity.html CMessageEntity|file=message__entity_8cpp-source.html message_entity.cpp}} | {{in code|class=class_c_message_entity.html CMessageEntity|file=message__entity_8cpp-source.html message_entity.cpp}} | ||
{{clr}} | {{clr}} | ||
== Changing text in Runtime == | |||
KeyValue "Entity Message" can be changed in runtime via VScript. You don't need to re-enable entity, changes will appear immediately. | |||
Here is short example: | |||
<source lang=cpp> | |||
current_entity = Entities.FindByName( cur_ent, "point_message_1" ); | |||
current_entity.__KeyValueFromString("message", "Hello World!"); | |||
</source> | |||
== Keyvalues == | == Keyvalues == |
Revision as of 09:20, 19 February 2020

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




Changing text in Runtime
KeyValue "Entity Message" can be changed in runtime via VScript. You don't need to re-enable entity, changes will appear immediately. Here is short example:
current_entity = Entities.FindByName( cur_ent, "point_message_1" );
current_entity.__KeyValueFromString("message", "Hello World!");
Keyvalues
- Show message radius (radius) ([todo internal name (i)]) <integer>
- Distance the player must be within to see this message.
- Developer Only? (developeronly) ([todo internal name (i)]) <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 - A similar entity that displays a custom message directly on the player screen.
- game_text_tf -
only. A similar entity that displays a custom HUD message on a team's screen.