Response System
Jump to navigation
Jump to search
Introduction
In HL2, AIs speak based on Concepts.
/scripts/talker/response_rules.txt
is the base script file for this Response System. It contains criterion/rule/response definitions. This controls interactive NPC talks in game. e.g. It makes Alyx say "Excuse me," Citizens greet, Vortigaunts tell stories, etc.
The Response system checks each rule against the set, give it a numeric score based on the rule's set of criteria. Then the system picks one rule with the highest score, dispatch a response that the rule points.
Add your new custum NPC to the Response System
- Make your NPC derived from NPC_talker
- Write a new rule script for your NPC
- See npc_xxx.txt for examples
- Include the new script in
/scripts/talker/response_rules.txt