Vgui text display

From Valve Developer Community
Revision as of 00:01, 8 April 2024 by Toligon (talk | contribs) (Created page with "{{Language subpage}} Displays a VGui text label oriented in the world. Can be considered {{Mapbase|4}}'s equivalent of {{ent|point_worldtext}}. The panel itself can be display...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)Translate (Translate)

Displays a VGui text label oriented in the world. Can be considered Mapbase Mapbase's equivalent of point_worldtext. The panel itself can be displayed with the 'r_vguitext_bg' cvar.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by.
Entity Scripts (vscripts) <string>
Name(s) of script files that are executed after all entities have spawned.
Script think function (thinkfunction) <string>
Name of a function in this entity's script scope which will be called automatically.
Parent (parentname) <targetname>
The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Use the format <parent name>, <attachment> to parent to a specific attachment point.
Pitch Yaw Roll (X Y Z) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
spawnflags (spawnflags) <flags>
Entity Message (message) <string>
The text to appear on the panel. Has a maximum of 256 characters. If you need more space, use a localization token.
Text Alignment (alignment) <choices>
The text's alignment in relation to the panel size. With 'South', the text will be centered between the origin and the sphere's left bound relative to the angles the text is facing.
Font (font) <string>
The font to use from resource/ClientScheme.res. A blank value is equivalent to the default font. Not all fonts may function. Commonly defined fonts include 'DefaultSmall' and 'Trebuchet18'/'Trebuchet24'.
Panel Resolution (resolution) <integer>
The number of pixels available to the text. The higher the resolution is, the smaller the text will be.
Warning.pngWarning:Changing the resolution with inputs later will scale the screen itself!
Panel Size (textsize) <float>
The size of the text panel in the world. This is previewed with a sphere, but it actually extends 'north-west' relative to the direction it's facing. Due to the limited in-editor previewing abilities, it's recommended to use the 'SetPanelSize' input in-game with the 'ent_fire' command to fine-tune this value. Use 'r_vguitext_bg' to display the panel in-game.
Alpha (0 - 255) (spawnflags) <flags>
spawnflags (renderamt) <integer>
The FX amount is used by the selected Render Mode.
Color (rendercolor) <color255>

Inputs

RunScriptFile <stringRedirectInput/string>
Execute a game script file from disk.
RunScriptCode <stringRedirectInput/string>
Execute a string of script source code.
RunScriptCodeQuotable <stringRedirectInput/string>
Execute a string of script source code which converts double apostrophes () to quotation marks for strings.
CallScriptFunction <stringRedirectInput/string>
Call a named function from this entity's Activation Script.
RunScriptFile <stringRedirectInput/string>
Execute a game script file from disk.
ClearScriptScope
Clears this entity's script scope.
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
KillIfNotVisible
Removes this entity if it is not in a player's viewcone.
KillWhenNotVisible <floatRedirectInput/float>
Removes this entity when it is not in a player's viewcone. You can pass a time for when this should start.
AddOutput <stringRedirectInput/string>
ChangeVariable <stringRedirectInput/string>
Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.
FireUser1
Causes this entity's OnUser1 output to be fired.
FireUser2
Causes this entity's OnUser1 output to be fired.
FireUser3
Causes this entity's OnUser1 output to be fired.
FireUser4
Causes this entity's OnUser1 output to be fired.
PassUser1 <stringRedirectInput/string>
Causes this entity's OutUser1 output to be fired. Can pass any parameter.
PassUser2 <stringRedirectInput/string>
Causes this entity's OutUser2 output to be fired. Can pass any parameter.
PassUser3 <stringRedirectInput/string>
Causes this entity's OutUser3 output to be fired. Can pass any parameter.
PassUser4 <stringRedirectInput/string>
Causes this entity's OutUser4 output to be fired. Can pass any parameter.
FireRandomUser
Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.
PassRandomUser <stringRedirectInput/string>
Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. Can pass any parameter.
FireOutput <stringRedirectInput/string>
Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.
RemoveOutput <stringRedirectInput/string>
Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.
AcceptInput <stringRedirectInput/string>
Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.
CancelPending
Cancels any events fired by this entity that are currently pending in the I/O event queue.
SetLocalOrigin <vectorRedirectInput/Vector>
Sets this entity's origin in local space, relative to its parent if one exists. Otherwise relative to the world.
SetAbsOrigin <vectorRedirectInput/Vector>
Sets this entity's origin in the map, always relative to the world origin.
SetLocalVelocity <vectorRedirectInput/Vector>
Sets this entity's current velocity.
SetLocalAngularVelocity <vectorRedirectInput/Vector>
Sets this entity's current angular velocity.
AddSpawnFlags <integerRedirectInput/integer>
Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.
RemoveSpawnFlags <integerRedirectInput/integer>
Removes spawnflag(s) from this entity. Many spawnflags have their respective numbers suffixed in this FGD.
AddSolidFlags <integerRedirectInput/integer>
Adds solid flags to this entity.
RemoveSolidFlags <integerRedirectInput/integer>
Removes solid flags from this entity.
SetHealth <integerRedirectInput/integer>
Sets this entity's health.
AddHealth <integerRedirectInput/integer>
Adds to this entity's health.
RemoveHealth <integerRedirectInput/integer>
Removes from this entity's health.
SetMaxHealth <integerRedirectInput/integer>
Sets this entity's max health.
SetEntityName <targetnameRedirectInput/string>
Sets this entity's name that other entities should refer to it by.
SetTarget <targetnameRedirectInput/string>
Sets this entity's target. This is specific to certain entities, particularly logic entities that involve a target.
SetOwnerEntity <targetnameRedirectInput/string>
Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.
SetThinkNull
Sets this entity's general think function to null. Behavior varies from entity to entity.
Use
More or less replicates the player interacting with an entity. (+USE)
Touch <targetnameRedirectInput/string>
Simulates this entity touching the specified entity.
SetParent <targetnameRedirectInput/string>
Changes the entity's parent in the movement hierarchy.
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.