wiki:cs

Version 5 (modified by xwang, 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 30 units above the origin of the bot 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.

Parameters:

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

Responds:

  • t X Y P if the target can be seen,
    • where X is the distance between the quagent's origin and the target's origin (not the distance between their bounding box edges),
    • where Y is the yaw from the quagent's current view angle to the target's origin (in degrees). The ray is sourced from the quagent's origin.
    • where P is the pitch from the quagent's current view angle to the target's origin (in degrees). The ray is sourced from the quagent's origin, a quagent with a level view looking at another quagent on on the same floor will get a P of zero.
  • f 0 0 0 if the target cannot be seen.

Reports:

  • done when the task completes.
  • 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 cs 512 3"
  • Bot replies "rs cs 512 t 44.5 -171.00 22.01"
  • Bot replies "cp cs 512 done"