wiki:sy

This ProtocolZero command tells the agent to say the specified string aloud. Only other quagents with line of sight to this quagent will hear the message (specifically, any quagent that would show up on an ra with a radius equal to the volume parameter of this command will hear the message). You should read the EventSocket page if you intend to use this command.

Parameters:

  • 1: float volume. This is the maximum hearing distance - quagents further than this distance will not hear the message. A negative number represents infinite volume.
  • 2: string message. Unlike other commands, sy accepts a string parameter, which may contain any number of spaces. An individual string for a sy command cannot be longer than 4095 characters (including spaces). This message is transmitted to the EventSocket of the quagents who hear the message. The speaking quagent always hears its own message. The message may not contain newline characters.

Events:

  • X M where X is the entityid of the speaking quagent, and M is the message, terminated by a newline.

Reports:

  • done once one the message has been sent on all sockets.
  • popped if popped by po.
  • forgotten if deleted by fa or fm.
  • replaced if replaced by a command scheduled with 'r'.

Example:

  • User sends: "n sy 512 600 Luke, I am your father."
  • On the EventSocket of all bots within 600 units that have line-of-sight, the message "ev sy 1 Luke, I am your father." arrives (terminated by a newline).
  • Bot replies: "cp sy 512 done"
Last modified 13 years ago Last modified on Jun 22, 2011 11:47:52 AM