Difference between revisions of "Message-In-Stack Action"

From AgentCubes
Jump to navigation Jump to search
imported>Mike
imported>Mike
Line 1: Line 1:
[[Image:message in stack.png|150px 150px]]  
+
[[Image:Message in stack.png|150px 150px]]  
  
 
{| width="100%" cellspacing="0" cellpadding="10" border="0"
 
{| width="100%" cellspacing="0" cellpadding="10" border="0"
Line 8: Line 8:
 
| width="80" valign="top" align="left" | '''Parameters:'''  
 
| width="80" valign="top" align="left" | '''Parameters:'''  
 
| width="100%" valign="top" align="left" | [[Method parameter|method]], [[Message In Stack parameter|agents_in_stack]]: The method parameter specifies which method needs to be called.&nbsp; The agents_in_stack parameter specifies which other agents in this agent's stack should receive the spcified message.&nbsp; <br>
 
| width="100%" valign="top" align="left" | [[Method parameter|method]], [[Message In Stack parameter|agents_in_stack]]: The method parameter specifies which method needs to be called.&nbsp; The agents_in_stack parameter specifies which other agents in this agent's stack should receive the spcified message.&nbsp; <br>
 +
|-
 +
| width="80" valign="top" align="left" | '''Example:'''
 +
| width="100%" valign="top" align="left" | '''Composite Agents:''' Image you wanted to create a tank that was a combination of a base agent for the wheels of the tank and a turret agent which would go on top.&nbsp; When moving the tank we could have the movement be syncrhonzied by using the '''transport '''action but in order to cause the turret to rotate with the base of the tank we could use the '''Message In Stack '''
 
|}
 
|}
  
 
[[Category:AgentCubes_Actions]]
 
[[Category:AgentCubes_Actions]]

Revision as of 21:27, 5 April 2012

150px 150px

Definition: The message in stack action will trigger a message in other agents in this agent's stack.  Note that this agent will not receive the message from message in stack.
Parameters: method, agents_in_stack: The method parameter specifies which method needs to be called.  The agents_in_stack parameter specifies which other agents in this agent's stack should receive the spcified message. 
Example: Composite Agents: Image you wanted to create a tank that was a combination of a base agent for the wheels of the tank and a turret agent which would go on top.  When moving the tank we could have the movement be syncrhonzied by using the transport action but in order to cause the turret to rotate with the base of the tank we could use the Message In Stack