Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "Message numbers"

From Creatures Wiki
Jump to navigation Jump to search
(Added more to table)
Line 1: Line 1:
 
'''Message numbers''' are used in [[CAOS]] [[script]]s when passing messages to an agent, i.e. to inform an agent of an event.
 
'''Message numbers''' are used in [[CAOS]] [[script]]s when passing messages to an agent, i.e. to inform an agent of an event.
  
They are most notably by [[MESG WRIT]]. Most message numbers are identical to [[script numbers]], but some of the earlier ones differ. These are:
+
They are mostly invoked by creatures or the pointer or sent with the CAOS command [[MESG WRIT]]. Most message numbers are identical to [[script numbers]], but some of the earlier ones differ. For the Creatures Evolution Engine, the most notable message numbers are:
  
<table><tr><td><b>Number</b></td><td><b>Message</b></td></tr>
+
<table><tr><td><span>Number</span></td><td><span>Name</span></td><td><span>Description</span></td></tr>
<tr><td>0</td><td>Activate 1 ([[Push]])</td></tr>
+
<tr><td><span>0</span></td><td><span>Activate 1 ([[Push]])</span></td><td><span>Calls the Activate 1 script.  If the message is from a creature, and the permissions set with BHVR disallow it, then the script is not executed.</span></td></tr>
<tr><td>1</td><td>Activate 2 ([[Pull]])</td></tr>
+
<tr><td><span>1</span></td><td><span>Activate 2 ([[Pull]])</span></td><td><span>Calls the Activate 2 script.  The permissions set with BHVR are checked first.</span></td></tr>
<tr><td>2</td><td>Deactivate</td></tr>
+
<tr><td><span>2</span></td><td><span>Deactivate</span></td><td><span>Calls the Deactivate script.  The permissions set with BHVR are checked first.</span></td></tr>
 +
<tr><td><span>3</span></td><td><span>Hit</span></td><td><span>Calls the Hit script.  If the message is from a creature, and the permissions set with BHVR disallow it, then the message is not sent.</span></td></tr>
 +
<tr><td><span>4</span></td><td><span>Pickup</span></td><td><span>The agent is picked up by the agent that the message was FROM.  The permissions set with BHVR are checked first.</span></td></tr>
 +
<tr><td><span>5</span></td><td><span>Drop</span></td><td><span>If the agent is being carried, then it is dropped.</span></td></tr>
 +
<tr><td><span>12</span></td><td><span>Eat</span></td><td><span>Calls the Eat script.  The permissions set with BHVR are checked first.</span></td></tr>
 +
<tr><td><span>13</span></td><td><span>Hold Hands</span></td><td><span>Causes a creature to hold hands with the pointer.</span></td></tr>
 +
<tr><td><span>14</span></td><td><span>Stop Holding Hands</span></td><td><span>Causes a creature to stop holding hands with the pointer.  Since messages take a tick to be procesed, calling NOHH is quicker than using this message.</span></td></tr>
 
</table>
 
</table>
 +
 +
Other message numbers are identical to the [[script numbers]].
  
 
If a message is from a Creature, the agent's [[BHVR]] is always checked first, and the message is passed only if BHVR allows.
 
If a message is from a Creature, the agent's [[BHVR]] is always checked first, and the message is passed only if BHVR allows.
 
[[Category:CAOS]]
 
[[Category:CAOS]]

Revision as of 10:54, 23 June 2018

Message numbers are used in CAOS scripts when passing messages to an agent, i.e. to inform an agent of an event.

They are mostly invoked by creatures or the pointer or sent with the CAOS command MESG WRIT. Most message numbers are identical to script numbers, but some of the earlier ones differ. For the Creatures Evolution Engine, the most notable message numbers are:

NumberNameDescription
0Activate 1 (Push)Calls the Activate 1 script. If the message is from a creature, and the permissions set with BHVR disallow it, then the script is not executed.
1Activate 2 (Pull)Calls the Activate 2 script. The permissions set with BHVR are checked first.
2DeactivateCalls the Deactivate script. The permissions set with BHVR are checked first.
3HitCalls the Hit script. If the message is from a creature, and the permissions set with BHVR disallow it, then the message is not sent.
4PickupThe agent is picked up by the agent that the message was FROM. The permissions set with BHVR are checked first.
5DropIf the agent is being carried, then it is dropped.
12EatCalls the Eat script. The permissions set with BHVR are checked first.
13Hold HandsCauses a creature to hold hands with the pointer.
14Stop Holding HandsCauses a creature to stop holding hands with the pointer. Since messages take a tick to be procesed, calling NOHH is quicker than using this message.

Other message numbers are identical to the script numbers.

If a message is from a Creature, the agent's BHVR is always checked first, and the message is passed only if BHVR allows.