wiki:ra

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

--

This ProtocolZero command asks the agent to tell you the entityids? of every game object it can see within the provided range. It responds once for each entity, and completes after all responses are issued.

Radar example: response includes only green entity dots. Black lines indicate obstructing walls.

In the above example of an ra command, black lines are walls. Dots represent entities. The response only includes the green dots. Red dots are either occluded or out of range.

Parameters:

  • 1 float range. Only entities closer than this range are returned. If you provide a non-positive range, the command considers the range infinite.

Responds:

  • X TYPE D Y P for each entity that can be seen. The set of seen entities does not include the quagent itself.
    • where X is that entity's entityid?
    • where TYPE is the typename that would be returned by a wi on this entity.
    • where D is the distance to the entity.
    • where Y is the relative yaw to the entity from the quagent's current facing.
    • where P is the relative pitch to the entity from the quagent's current facing.

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 ra 512 400"
  • Bot replies "rs ra 512 2 player 331.00 22.12 99.324"
  • Bot replies "rs ra 512 144 ammo_shells 40.00 112.00 88.00"
  • Bot replies "rs ra 512 145 ammo_shells 55.00 112.00 88.00"
  • Bot replies "rs ra 512 146 ammo_shells 80.00 112.00 88.00"
  • Bot replies "rs ra 512 147 ammo_shells 100.00 112.00 88.00"
  • Bot replies "rs ra 512 148 ammo_shells 140.00 112.00 88.00"
  • Bot replies "cp ra 512 done"

Attachments (2)

Download all attachments as: .zip