Difference between revisions of "Has-attribute Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Repenning
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[image:Has attribute condition.png|150px]]
+
[[Image:Has attribute.png|200px|Has attribute.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
[[Image:Has attribute direction.png|200px|Has attribute direction.png]]  
<tr>
 
<td align="left" valign="top" width="80"><b>Definition:</b></td>
 
<td align="left" valign="top" width="100%">The <strong>Has-attribute</strong> condition checks if the agent in the direction specified by the [[Direction parameter]] has the attribute selected in the condition's [[Attribute name parameter|attribute name]] pop-up field. If the specified agent has selected Attribute, the condition is true. Otherwise, it is false.</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Attribute name parameter|attribute name]]</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">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).
 
[[Image:Has attribute condition example.png|500px]]</td>
 
</tr>
 
  
</table>
+
[[Image:Has attribute expanded.png|200px|Has attribute expanded.png]]
 +
 
 +
{| cellpadding="10" cellspacing="0" border="0" width="100%"
 +
|-
 +
| align="left" valign="top" width="80" | '''Definition:'''
 +
| align="left" valign="top" width="100%" | True if the agent has this attribute.
 +
|-
 +
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" | [[Direction parameter|direction]] ''check the agent in which direction?''&nbsp; <br> [[Attribute name parameter|attributeName]]&nbsp;''the name of the attribute''
 +
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | 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).&nbsp;
 +
|}
  
 
[[Category:AgentCubes_Conditions]]
 
[[Category:AgentCubes_Conditions]]

Latest revision as of 02:52, 20 April 2012

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).