(info) This AI is still in early stages of development.

DroidObject.js

Provides WZ 3.2 compatible Droid objects...

 

General

This script adds a large number of missing properties to Droid objects. JS API functions and events which return droid objects are managed via the main GO32 API to ensure they return enhanced objects.

Property values are determined on their first access and then cached for the remainder of the game.

(tick) .group

The group property is implemented separately via Groups.js.

(warning) .born

Use this property exactly as you would on Warzone 3.2.

Notes:

  • Droids produced by your script will have accurate .born values (via DroidProduction.js)
  • Droids pre-placed on the map, for all players, will have accurate .born values
  • Droids produced by other players during the game will have approximate values
  • Native .born property is used on WZ 3.2+ for full reliability

(warning) .isSensor

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On WZ 3.1, the property is determined via go.guessSensor()
  • On WZ 3.2 the native property is used for full reliability

(warning) .isRadarDetector

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On WZ 3.1, the property is determined via go.guessSensor()
  • On WZ 3.2 the native property is used for full reliability

(warning) .isCB

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On WZ 3.1, the property is determined via go.guessSensor()
  • On WZ 3.2 the native property is used for full reliability

(tick) .isVTOL

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On WZ 3.1, the property is determined via the presence of an .armed property on the native droid object
  • On WZ 3.2 the native property is used for full reliability

(warning) .canHitAir

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On Warzone 3.1, this property is determined in two ways:
    • If an enemy unit attacks one of your VTOLs, we know that unit .canHitAir
    • Prior to such confirmation, the value is determined via go.guessCanHitAir()
    • Otherwise, the property value will default to undefined
  • On Warzone 3.2, the native property is used for full reliability

(warning) .canHitGround

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On Warzone 3.1, this property is determined in two ways:
    • If an enemy unit attacks one of your non-VTOL units or a structure, we know that unit .canHitGround
    • Prior to such confirmation, the value is determined via go.guessCanHitGround()
    • Otherwise, the property value will default to undefined
  • On Warzone 3.2, the native property is used for full reliability

(warning) .hasIndirect

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On Warzone 3.1, this property is determined in the following ways:
    • If a droid is doing DORDER_FIRESUPPORT, we know it .hasIndirect
    • If it's range is known to be ≥18 tiles, we can assume it .hasIndirect but only if certain that it .canHitGround
    • As a last resort, the value is determined via go.guessHasIndirect()
    • Otherwise, the property value will default to undefined
  • On Warzone 3.2, the native property is used for full reliability

(warning) .armed

Use this property exactly as you would on Warzone 3.2 (note that it is deprecated though).

Notes:

  • On Warzone 3.1:
    • Will be null for all non-weapon objects
    • Will be accurate value for VTOLs
    • For all other weapon objects, the value will be 100 unless the script is aware of them firing their weapon in the last 2 seconds in which case the value will be 60
    • Note: There's no way to know when your scripts droids have fired their weapon (unless they are a VTOL).
  • On Warzone 3.2 the native property is used

(warning) .cost

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On Warzone 3.1:
    • This property will generally be very inaccurate
    • However, DroidProduction.js will attempt to provide more accurate values for droids created by your script
  • On Warzone 3.2 the native property is used for full accuracy

(warning) .range

Use this property exactly as you would on Warzone 3.2.

Notes:

  • On Warzone 3.1:
    • Range of enemy units updated when they attack your units (if the new attack has longer range than previous attacks)
    • If range is unknown, go.guessObjectRange() is used
    • If no range can be determined, defaults to 2.
  • On Warzone 3.2:
    • Native property used (note that it's deprecated on WZ 3.2)

(warning) .weapons[]

Use this property exactly as you would on Warzone 3.2.

Warzone 3.1 notes:

  • The array will be present on all ownable (droid/structure) objects
  • Only known turrets will be listed in the array, otherwise it will be empty
    • Often, only the first turret can be identified (if at all)
    • DroidProduction.js ensures that droids produced by your script will accurately list all turrets
  • The .lastFired and .armed properties will have the same value for each weapon in the array
  • .lastFired can only be determined for other players' objects that attack your objects, otherwise it defaults to 0
  • .armed returns the main <object>.armed value

On Warzone 3.2 the native property is used for full accuracy and reliability.

Availability 3.1 B5+

Requires:

Contents

Jump to: