| 1 | == EventSocket == |
| 2 | The event socket is used for event-based data that has nothing to do with any particular command on the command channel. To establish a connection, connect to port 6001 while URCS Quagents3 is running. Next, issue an "identity X" (where X is the entitynum of the quagent) command to create an event socket for that quagent. |
| 3 | |
| 4 | '''Messages:'''[[BR]] |
| 5 | |
| 6 | All messages on the event socket start with "ev". |
| 7 | * sy - "Say" |
| 8 | * returns X M where X is the entityid of the speaking quagent, and M is the message, terminated by a newline. |
| 9 | * dt - "Death" |
| 10 | * returns the quagent's own entityid when it dies |
| 11 | |
| 12 | '''Example:''' |
| 13 | * User sends: "n sy 512 600 Hello, I am a quagent." |
| 14 | * On the EventSocket of all bots within 600 units that have line-of-sight, the message "ev sy 1 Hello, I am a quagent." arrives (terminated by a newline). |
| 15 | * Quagent 1 is killed. |
| 16 | * On quagent 1's event socket, the message ev dt 1 arrives. |
| 17 | |