env_instructor_hint

From Valve Developer Community
Revision as of 21:54, 26 October 2012 by Barracuda (talk | contribs) (Typo)

Jump to: navigation, search
Env instructor hint.gif

<Left 4 Dead 2> env_instructor_hint is a point entity available in Left 4 Dead 2. It is also available in Portal 2. It allows creation and control of instructor lessons by map logic.

Note:env_instructor_hint currently cannot display more than one hint at the same time.

Keyvalues

Target Entity <targetname>
The entity to show this hint on top of. The entity used must exist on the client, info_target_instructor_hint can be parented to server only entities for this purpose.
Positioning <choices>
Either show at the position of the Target Entity. Or show the hint directly on the hud at a fixed position.
  • 0 : Follow the Target Entity
  • 1 : Show on the hud
Allow invisible target <choices>
Do we allow the hint to follow entites with nodraw set?
  • 0 : End immediately on nodraw
  • 1 : Yes
Caption <string>
The text of your hint. (Note: It seems that this text cannot exceed 100 characters - if it does, it appears that the hint won't display.)
Caption Color <color255>
The color of the caption text
Force caption <choices>
Do we show the caption text even if the hint is occluded by a wall?
  • 0 : No
  • 1 : Show when occluded
Onscreen Icon <choices>
The icon to use when the hint is within the player's view.
Offscreen Icon <choices>
The icon to use when the hint is outside the player's view.
Show offscreen <choices>
When the hint is offscreen, do we show an icon and arrow?
  • 0 : Show
  • 1 : Don't show
Bound Command <string>
If using 'show key bindings' for the onscreen icon, this field should be the command we want to show bindings for
Icon Height Offset <float>
A height offset from the target entity's origin to display the hint
Size Pulsing <choices>
The icon size can pulsate
  • 0 : No Pulse
  • 1 : Slow Pulse
  • 2 : Fast Pulse
  • 3 : Urgent Pulse
Alpha Pulsing <choices>
The icon alpha can pulsate
  • 0 : No Pulse
  • 1 : Slow Pulse
  • 2 : Fast Pulse
  • 3 : Urgent Pulse
Shaking <choices>
The icon can shake
  • 0 : No Shaking
  • 1 : Narrow Shake
  • 2 : Wide Shake
Timeout <integer>
The automatic timeout for the hint. 0 will persist until stopped with EndHint.
Display Range <float>
The visible range of the hint. 0 will show it at any distance.
Show on First Sight <boolean>
When the player first sees it, it will automatically show for them.
Gamepad Bound Command <string> (New with Portal 2)
If using 'show key bindings' for the onscreen icon, this field should be the command we want to show bindings for when gamepad is enabled (and PS3/X360)

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

Inputs

ShowHint
Start showing the hint. If an entity name is passed as a parameter, the hint is shown only to that entity.
EndHint
Stop showing the hint if it hasn't already timed out.

Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
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.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin  <coordinates> (New with Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles.

Outputs

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.

Icons

Icon Name Icon
icon_tip Hint 001 icon tip.jpg
icon_info Hint 002 icon info.jpg
icon_shield Hint 003 icon shield.jpg
icon_alert Hint 004 icon alert.jpg
icon_alert_red Hint 005 icon alert red.jpg
icon_tip (again) Hint 006 icon tip (again).jpg
icon_skull Hint 007 icon skull.jpg
icon_no Hint 008 icon no.jpg
Icon Name Icon
icon_interact Hint 009 icon interact.jpg
icon_button Hint 010 icon button.jpg
icon_door Hint 011 icon door.jpg
icon_arrow_plain Hint 012 icon arrow plain.jpg
icon_arrow_plain_white_dn Hint 013 icon arrow plain white dn.jpg
icon_arrow_plain_white_up Hint 014 icon arrow plain white up.jpg
icon_arrow_up Hint 015 icon arrow up.jpg
icon_arrow_right Hint 016 icon arrow right.jpg
Note:env_instructor_hint is not limited to icons listed above, please refer to scripts/mod_textures.txt located in the main pak01_dir.vpk for more icon options.

show key bindings

This is a special icon that requires setting entity property Bound Command. The following example sets Bound Command to "jump" (without quotations) with Caption set to "Bet you can't jump over me!" (without quotations).

Hint 017 show key bindings.jpg

In this case, "+jump" is bound to "SPACE", the space bar on the keyboard. More commands can be found in the Left 4 Dead 2 cfg folder. Open config.cfg in a text editor to review which commands are currently bound to the client.

See also