wiki:cs

Version 1 (modified by jpawlick, 13 years ago) (diff)

--

This query asks the agent to tell you if it has line of "sight" to another entity (specified by the entityid you give it). For quagents, the id number returned after the ready? command is the entityid, but other things (such as rockets, rail traces, powerups, etc) also have entityids. The line of sight ray is drawn from the bot's eye to 30 units above the origin of the target. Unlike the Eye of Sauron, its gaze only pierces cloud, shadow, and flesh (not earth). In other words, obstructing entities, water, slime, or lava do not block line of sight - only walls, floors, and things like that do. It does not bounce off mirrored surfaces or go through portals. Lack of light does not affect this operation.

TODO: Add Y, Z to response, where Y is yaw offset to target, Z is pitch offset to target.

Parameters:

  • 1 integer entityid, the entityid of the target entity.

Responds:

  • t X where X is the range at which the object is seen (if it can be seen).
  • f X where X is the range of the nearest obstructing wall (if the target cannot be seen).

Reports:

  • done when the task completes.
  • popped if popped by po.
  • forgotten if deleted by fa.

Example:

  • User sends: "n rf 512 6000 90 45"
  • Bot replies "rs rf 512 65.2 -2"
  • Bot replies "cp rf 512 done"