Has-attribute Condition

From AgentSheetsWiki

Jump to: navigation, search

Has attribute.png

Has attribute direction.png

Has attribute expanded.png

Definition: True if the agent has this attribute.
Parameters: direction check the agent in which direction? 
attributeName the name of the attribute
Example: In the Ultimate Pacman project, the Red Ghost agent checks if the agent above it has the attribute p. It then compares this attribute p to the current maxp (the maximum p) and, if p is greater, sets maxp to p. The Red Ghost then changes its facial expression to look as if it is going upwards. This is part of the behavior for tracking down the Pacman agent (see the Ultimate Pacman "Readme" file for a complete explanation of the tracking behavior). 
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox