Type SensorArray

Interface into a TSCM sensor array.

Methods

deepScanTarget( ent ) Deep scans the given target entity (if it is scannable), and returns a table describing its current state.
getDeepScanEnergyCost() Returns the energy cost to perform a deep scan.
getMaxDeepScanRange() Returns the maximum range at which an entity can be deep-scanned by this sensor array.
getTarget() Returns the sensor array's current target entity.
getTargetHealth() Returns the health of the sensor array's current target.
getTargetMaxHealth() Returns the maximum health of the sensor array's current target.
setTarget( ent ) Sets the current scan target on the sensor array.


Methods

SensorArray:deepScanTarget( ent )
Deep scans the given target entity (if it is scannable), and returns a table describing its current state. The exact format of the scan output depends on the entity being scanned. This operation is separate to the sensor's current target, which is continuously updated. Deep scans return more information, such as type information on weapons. Each successful deep scan performed costs energy (see SensorArray:getDeepScanEnergyCost()) and has a maximum range (see SensorArray:getMaxDeepScanRange()).

Environment:

Server

Parameters:

  • (Entity) ent: The entity to be scanned.

Return values:

  1. (table | nil) A table of information describing the entity, if it could be scanned, or nil if the entity was not scannable.
  2. (string | nil) If the entity could not be scanned, the reason why.
SensorArray:getDeepScanEnergyCost()
Returns the energy cost to perform a deep scan.

Environment:

Server
SensorArray:getMaxDeepScanRange()
Returns the maximum range at which an entity can be deep-scanned by this sensor array.

Environment:

Server
SensorArray:getTarget()
Returns the sensor array's current target entity.

Environment:

Server
SensorArray:getTargetHealth()
Returns the health of the sensor array's current target.

Environment:

Server
SensorArray:getTargetMaxHealth()
Returns the maximum health of the sensor array's current target.

Environment:

Server
SensorArray:setTarget( ent )
Sets the current scan target on the sensor array.

Environment:

Server

Parameters:

  • (Entity) ent: The entity to set as the current target.

Return values:

  1. (boolean) True if setting the target succeeded, false otherwise.
  2. (string) If setting the target failed, the reason why.

Valid XHTML 1.0!