Difference between revisions of "Env instructor hint"
m (Typo) |
(Added L4D2 EMS update keyvalues) |
||
Line 43: | Line 43: | ||
{{KV|Show on First Sight|boolean|When the player first sees it, it will automatically show for them.}} | {{KV|Show on First Sight|boolean|When the player first sees it, it will automatically show for them.}} | ||
{{KV|Gamepad Bound Command|string|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)|since=p2}} | {{KV|Gamepad Bound Command|string|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)|since=p2}} | ||
+ | {{KV|Lesson Name|string|Hints with the same lesson name use a common base and are treated as instances the same lesson type.|since=l4d2}} | ||
+ | {{KV|Display Limit|integer|The number of times a hint can be seen. 0 means unlimited.|since=l4d2}} | ||
+ | {{KV|Instance Type|choices|How many instances of a single lesson type can be open or active at the same time. | since=l4d2}} | ||
+ | :* 0 : Multiple | ||
+ | :* 1 : Single Open (Prevents new hints from opening.) | ||
+ | :* 2 : Fixed Replace (Ends other hints when a new one is shown.) | ||
+ | :* 3 : Single Active (Hides other hints when a new one is shown.) | ||
+ | {{KV|Suppress rest before moving|choices|Suppress the initial icon display in center of screen? | since=l4d2}} | ||
+ | :* 0 : No | ||
+ | :* 1 : Yes | ||
{{KV Targetname}} | {{KV Targetname}} | ||
Revision as of 01:56, 27 September 2013

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.

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>
(in all games since)
- 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)
- Lesson Name
<string>
(in all games since)
- Hints with the same lesson name use a common base and are treated as instances the same lesson type.
- Display Limit
<integer>
(in all games since)
- The number of times a hint can be seen. 0 means unlimited.
- Instance Type
<choices>
(in all games since)
- How many instances of a single lesson type can be open or active at the same time.
- 0 : Multiple
- 1 : Single Open (Prevents new hints from opening.)
- 2 : Fixed Replace (Ends other hints when a new one is shown.)
- 3 : Single Active (Hides other hints when a new one is shown.)
- Suppress rest before moving
<choices>
(in all games since)
- Suppress the initial icon display in center of screen?
- 0 : No
- 1 : Yes
Targetname:
- Name
(targetname)
<string>
- The targetname that other entities refer to this entity by.
- Entity Scripts
(vscripts)
<scriptlist>
(in all games since)
- 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
(thinkfunction)
<string>
(in all games since)
- 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 from the world.
KillHierarchy
- Removes this entity and its children from the world.
Note: Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than
Kill
. AddOutput
<string>
- Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
KV Format:<key> <value>
I/O Format:<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1
toFireUser4
- Fire the
OnUser
outputs; see User Inputs and Outputs. Use
!FGD- Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
RunScriptFile
<script>
(in all games since)
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode
<string>
(in all games since)
- 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
, 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>
(in all games since) !FGD
- Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin
<coordinates>
(in all games since) !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>
(in all games since) !FGD
- Set this entity's angles.
Outputs
Targetname:
OnUser1
toOnUser4
- These outputs each fire in response to the firing of the like-numbered
FireUser1
toFireUser4
Input; see User Inputs and Outputs. OnKilled
(only in)
- This output fires when the entity is killed and removed from the game.
Icons
Icon Name | Icon |
---|---|
icon_tip | ![]() |
icon_info | ![]() |
icon_shield | ![]() |
icon_alert | ![]() |
icon_alert_red | ![]() |
icon_tip (again) | ![]() |
icon_skull | ![]() |
icon_no | ![]() |
Icon Name | Icon |
---|---|
icon_interact | ![]() |
icon_button | ![]() |
icon_door | ![]() |
icon_arrow_plain | ![]() |
icon_arrow_plain_white_dn | ![]() |
icon_arrow_plain_white_up | ![]() |
icon_arrow_up | ![]() |
icon_arrow_right | ![]() |

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).
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.