| pos | scan origin. |
| ang | scan direction Euler angle. |
| sector.x | horizontal scan sector, or scan cone width in degrees (360 for a full sphere) |
| sector.y | vertical scan sector in degrees, or 0 for a circular scan cone. |
| sector.z | scan range in quants. |
| mode | scan mode (see below). |
The following mode values can be set:
| IGNORE_ME | Ignores the me entity; to be combined with SCAN_ENTS. |
| IGNORE_YOU | Ignores the you entity; to be combined with SCAN_ENTS. |
| IGNORE_PASSABLE | A7.2 LC Ignores entities with the PASSABLE flag; to be combined with SCAN_ENTS. |
| IGNORE_FLAG2 | A7.2 LC Ignores entities with FLAG2; to be combined with SCAN_ENTS. |
| SCAN_ENTS | Scans for entities within the cone, and triggers their EVENT_SCAN event. |
| SCAN_POS | Scans for camera positions placed in the level. |
| SCAN_PATHS | Scans for path start positions. |
| SCAN_NODES | Scans for path node positions. |
| SCAN_LIGHTS | Scans for static lights. |
| SCAN_LIMIT | Finds only entities with ENABLE_SCAN set, or only static lights whose range can reach the scan origin. Can be combined with SCAN_ENTS and SCAN_LIGHTS. |
| SCAN_FLAG2 | A7.2 LC Opposite of IGNORE_FLAG2: Finds only entities with FLAG2. |
| you | Pointer to the closest detected entity. |
| result | Distance to the closest detected object. |
| target | Position of the closest detected object. |
| bounce | Direction to the closest detected camera position. |
| tex_color | Color of the closest detected static light. |
function operate() // scan nearby doors or switches for operating them
{
c_scan(camera.x,camera.pan,vector(120,0,200),SCAN_ENTS | SCAN_LIMIT);
}
...
on_space = operate;
See also:
c_trace, path_scan, EVENT_DETECT, EVENT_SCAN ► latest version online