Ai npc eventresponsesystem: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Inputs: |prel4d=1)
m (also in portal 2)
Line 1: Line 1:
{{lang|Ai npc eventresponsesystem}}
{{lang|Ai npc eventresponsesystem}}
{{hl2 point|ai_npc_eventresponsesystem}} An entity that allows you to generate events for nearby friendly NPCs to respond to. {{todo|Example use?}}
{{hl2 point|ai_npc_eventresponsesystem}} An entity that allows you to generate events for nearby friendly NPCs to respond to. {{todo|Example use}}?
 
{{stray ent|{{portal2}}}}


{{code class|CNPCEventResponseSystemEntity|ai_eventresponse.cpp}}
{{code class|CNPCEventResponseSystemEntity|ai_eventresponse.cpp}}
Line 10: Line 12:


==Keyvalues==
==Keyvalues==
{{KV BaseEntity|base=1}}
{{KV BaseEntity|l4d=1|l4d2=1}}


==Inputs==
==Inputs==
Line 16: Line 18:
{{IO|ForceTriggerResponseEvent|param=string|Fire an NPC Response Event, and force the first available NPC to speak the response (breaking them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.}}
{{IO|ForceTriggerResponseEvent|param=string|Fire an NPC Response Event, and force the first available NPC to speak the response (breaking them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.}}
{{IO|ForceTriggerResponseEventNoCancel|param=string|Fire an NPC Response Event, and force the first available NPC to speak the response (but '''don't''' break them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.}}
{{IO|ForceTriggerResponseEventNoCancel|param=string|Fire an NPC Response Event, and force the first available NPC to speak the response (but '''don't''' break them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.}}
{{I BaseEntity|base=1|prel4d=1}}
{{I BaseEntity|prel4d=1}}


==Outputs==
==Outputs==

Revision as of 20:37, 14 September 2018

English (en)Translate (Translate)

Template:Hl2 point An entity that allows you to generate events for nearby friendly NPCs to respond to.

Todo: Example use

?

Note.pngNote:This entity is also in the code for Portal 2. Its functionality is not guaranteed.


C++ In code, it is represented by theCNPCEventResponseSystemEntityclass, defined in theai_eventresponse.cppfile.

ConVars/Commands

Cvar/Command Parameters or default value Descriptor Effect
ai_debug_eventresponses 0 0 disables, 1 enables "Set to 1 to see all NPC response events trigger, and which NPCs choose to respond to them."

Keyvalues

Inputs

TriggerResponseEvent <stringRedirectInput/string>
Fire an NPC Response Event. The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.
ForceTriggerResponseEvent <stringRedirectInput/string>
Fire an NPC Response Event, and force the first available NPC to speak the response (breaking them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.
ForceTriggerResponseEventNoCancel <stringRedirectInput/string>
Fire an NPC Response Event, and force the first available NPC to speak the response (but don't break them out of any scene they're in). The parameter should match the response rules concept that any nearby friendly NPCs will try to speak.


Outputs