Func orator: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Classifying as model entity)
 
(17 intermediate revisions by 11 users not shown)
Line 1: Line 1:
== Entity description ==
{{LanguageBar}}
A very simple model entity that has animations and response rules.
{{CD|CFlexExpresser}}
{{this is a|model entity|name=func_orator|series=Left 4 Dead}} It's an entity that allows the firing of a [[Response_System|response rule]] to a random player, allowing them to talk when prompted.<br>
This can be used for a simple one-liner, or to create whole conversations.


== Keyvalues ==
'''Example uses:'''
* {{KV Targetname}}
* Campaign intros firing an intro response rule, which causes one of many conversations to take place.
* {{KV Angles}}
* Panic events where the relay to start the event eventually fires an output to any player, making them speak up that the path is now cleared.
* {{KV Studiomodel}}
* Scripting conversations between the players and the person on the radio in the finale.
* {{KV DistanceFade}}
* '''disablereceiveshadows'''
: {{boolean}} Disable Recieving Shadows
* '''body'''
: <integer> The index of the body (reference) to use of the set model
* {{KV RenderFXChoices}}


* '''rendermode'''
{{Note|This entity does not require a model to function. However, in {{l4d|2}} not using a model causes the [[console]] to print a <code>WARNING: orator at X Y Z missing modelname</code>. Which can be ignored. In {{l4d2|2}} this message was removed and in official maps it's used without a model.}}
: <choices> Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
{{Note|Disembodied voices, such as the "NPC" on the radio, emit from the orator's location. For example, the orator in the finale of "No Mercy" is the white console next to the radio, causing the voices to only play on the right speaker when looking directly at the radio.}}
:{| {{standard-table}}
{{func point ent}}
! Literal Value || Render Mode || [[Render Modes|Description (Click for more info.)]]
|-
| 0 || Normal || Default rendering.
|-
| 1 || Color || Obsolete.
|-
| 2 || Texture || Plain opacity.
|-
| 3 || Glow || No Z buffer checks. Fixed size ''on screen''.
|-
| 4 || Solid / Alphatest || Obsolete. (Use [[Render Modes#Solid (Obsolete)|alphatest]] capabilities in materials instead.)
|-
| 5 || Additive || Obsolete. Add this entity's color to what's behind it.
|-
| 7 || Additive Fractional Frame || Obsolete? Blend between animation frames.
|-
| 8 || Alpha Add (Not in FGD.) || Add alpha.
|-
| 9 || World Space Glow || No Z buffer checks. Fixed size ''in world'' (as opposed to on screen).
|-
| 10 || Dont Render / None || Don't render.
|}


* '''renderamt'''
== Keyvalues ==
: <integer> ''FX Amount (0 - 255)'' - How opaque the entity will be rendered. (<code>0</code> is fully transparent, while <code>255</code> is fully opaque). Will not work if the ''rendermode'' keyvalue is set to ''Normal'' or ''Dont Render''.
{{studio rendering note|prepend=This entity can optionally use a model.}}
{{KV Targetname}}
{{KV|Max Followup Dist|intn=maxThenAnyDispatchDist|only={{l4d2}}|float|A 'then ANY' followup on a response from this orator will dispatch to characters up to this many units away. Leave 0 to mean that even an infinitely distant character may respond.}}}}


* '''rendercolor'''
== Flags ==
: <[[color255]]> ''FX Color'' - What color the entity will be rendered in (to the degree of the opacity set with ''renderamt'').
{{fl|1|Not Solid}}
 
 
==Flags==
 
* 1 : Not solid


== Inputs ==
== Inputs ==
* {{I Targetname}}
{{I|SpeakResponseConcept|Speak the specified response concept|param=string}}
 
* {{I RenderFields}}
 
* {{I Shadow}}
 
* '''SetBodyGroup <integer>'''
: HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing!
 
* '''{{EP1 add|SpeakResponseConcept <string>}}'''
: Speak the specified response concept.
== Outputs ==
* {{O Targetname}}
[[Category:Left 4 Dead Entities]]
[[Category:Left 4 Dead 2 Entities]]

Latest revision as of 04:31, 19 May 2025

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CFlexExpresser
CFlexExpresserShim
CFlexCycler
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity

func_orator is a model entity available in Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It's an entity that allows the firing of a response rule to a random player, allowing them to talk when prompted.
This can be used for a simple one-liner, or to create whole conversations.

Example uses:

  • Campaign intros firing an intro response rule, which causes one of many conversations to take place.
  • Panic events where the relay to start the event eventually fires an output to any player, making them speak up that the path is now cleared.
  • Scripting conversations between the players and the person on the radio in the finale.
Note.pngNote:This entity does not require a model to function. However, in Left 4 Dead Left 4 Dead not using a model causes the console to print a WARNING: orator at X Y Z missing modelname. Which can be ignored. In Left 4 Dead 2 Left 4 Dead 2 this message was removed and in official maps it's used without a model.
Note.pngNote:Disembodied voices, such as the "NPC" on the radio, emit from the orator's location. For example, the orator in the finale of "No Mercy" is the white console next to the radio, causing the voices to only play on the right speaker when looking directly at the radio.
Warning.pngRisk of Confusion:This is a point entity despite the name starting with func_ (which is usually used for brush entities).

Keyvalues

Note.pngNote:This entity can optionally use a model. See Model entity/Generic Keyvalues, Inputs and Outputs for keyvalues and inputs that affect model rendering.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Max Followup Dist (maxThenAnyDispatchDist) <float> (only in Left 4 Dead 2)
A 'then ANY' followup on a response from this orator will dispatch to characters up to this many units away. Leave 0 to mean that even an infinitely distant character may respond.}}

Flags

Not Solid : [1]

Inputs

SpeakResponseConcept <stringRedirectInput/string>
Speak the specified response concept