NPC Perception Design: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 9: | Line 9: | ||
<uml> | <uml> | ||
scale 0.5 | |||
class Perception | class Perception | ||
Perception <|-- RangePerception | Perception <|-- RangePerception | ||
Line 28: | Line 29: | ||
=== Personal NPC Perceptions Sequence === | === Personal NPC Perceptions Sequence === | ||
Show the typical sequence for a Perception fired for a NPC, might be perceptions like Damage Perception. | |||
<uml> | <uml> | ||
-> NPC : TriggerEvent | -> NPC : TriggerEvent | ||
Line 42: | Line 46: | ||
Reaction -> Reaction : Adjust Needs | Reaction -> Reaction : Adjust Needs | ||
Reaction -> Perception : ExecutePerception | Reaction -> Perception : ExecutePerception | ||
end | end | ||
NPC <- Reaction : SetLastPerception | NPC <- Reaction : SetLastPerception | ||
end | end | ||
</uml> | |||
=== Broadcast NPC Perceptions Sequence === | |||
Show the typical sequence for a broadcasted Perception. Examples of broadcasted perceptions is the SpellPerception. | |||
<uml> | |||
-> psNPCClient : TriggerEvent | |||
loop | |||
psNPCClient -> NPC : TriggerEvent | |||
NPC -> NPCType : FirePerception | |||
loop | |||
note over NPCType : See Personal NPC Perception Sequence for details. | |||
end | |||
end | |||
<-- psNPCClient | |||
</uml> | </uml> | ||
[[Category:Engine documents]] | [[Category:Engine documents]] |
Revision as of 19:06, 30 April 2011
See Behaviors_and_Reactions for User details about how to use Perceptions in the behavior.xml file.
This embodies any perception an NPC might have, or any game event of interest. Reaction objects below will subscribe to these events, and the networking system will publish them. Examples would be "attacked", "collided", "talked to", "hear cry".
NPC Perceptions
Class Hierarchy

Personal NPC Perceptions Sequence
Show the typical sequence for a Perception fired for a NPC, might be perceptions like Damage Perception.

Broadcast NPC Perceptions Sequence
Show the typical sequence for a broadcasted Perception. Examples of broadcasted perceptions is the SpellPerception.
