Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PropertyTypeRead-only?DescriptionValid for
.typeConstant(tick)

What sort of object is this?

  • WZ_TYPE_DROID
All droids
.idNumber(tick)Unique ID for this game objectAll droids
.nameString(tick)The name of this droidAll droids
.playerNumber(tick)

The ID of the player that owns this droid

Transfer a droid to another player using droid.TransferTo(player)

All droids
.selectedBoolean(error)

Has the owner of this droid currently selected it? true/false

All droids
.groupNumber(error)What group is the droid in? null if not in a groupAll droids
.experienceNumber(error)How much experience does the droid have?All droids
.ammoNumber(tick)

How much ammo does the droid have remaining (as a percentage): 100 = full, 0 = empty

If the droid doesn't have weapons / bombs then .ammo = null.

All droids
.costNumber(tick)How much did this droid cost us?All droids
.orderConstant(tick)What is the current order for this droid? (what has it been told to do?)All droids
.actionConstant(tick)What action is the droid currently performing? (how is it doing what it's been told to do?)All droids
.healthNumber(tick)What is the health level of this droid? (0 = pretty much dead, 100 = full health)All droids
.droidTypeConstant(tick)

(question) Is this really applicable any more? Other properties make it kind of redundant.

All droids
.positionPosition(tick)A position object (x,y,z)All droids
.terrainConstant(tick)

What terrain is the droid currently in/on?

  • WZ_TERRAIN_LAND
  • WZ_TERRAIN_AIR
  • WZ_TERRAIN_SEA
All droids
.thermalArmourNumber(tick)What is the thermal armour of this droid?All droids
.kineticArmourNumber(tick)What is the kinetic armour of this droid?All droids
.hasSensorBoolean(tick)Does this droid have a sensor system? true/falseAll droids
.hasCBBoolean(tick)Does this droid have CB system? true/falseAll droids
.hasECMBoolean(tick)Does this droid have ECM system? true/falseAll droids
.hasDetectorBoolean(tick)Does this droid have a radar detector? true/falseAll droids
.assigneesArray(tick)

An array of droid objects assigned to this droid.

Use otherDroid.assignTo(thisDroid) to assign droids.

All droids
.isEngineerBoolean(tick)Can this droid build/repair/demolish structures? true/falseAll droids
.isMechanicBoolean(tick)Can this droid repair droids? true/falseAll droids
.cargoArray of droid objects(tick)

An array of droids in the cargo hold of this droid.

Use droid.embark(transportDroid) to move droids in, droid.disembark() to move out.

.cargo.capacity (Number) indicates maximum capacity of the cargo hold.

remainingSpace = cargo.capacity - cargo.length

 
.canAttackAirBooleanNumber(tick)

Can this droid attack aircraft? return count of weapons capable of attacking aircraft

Can be treated as a boolean because 0 coerces to false

All droids
.canAttackGroundBooleanNumber(tick)

Can this droid attack ground units/structures/features? return count of weapons capable of attacking ground

Can be treated as a boolean because 0 coerces to false

All droids
.canAttackSeaBooleanNumber(tick)

Can this droid attack naval units (ships)? return count of weapons capable of attacking ships

Can be treated as a boolean because 0 coerces to false

 
.hasIndirectFirecanIndirectFireBooleanNumber(tick)

Does this droid have an indirect fire weapon? return count of indirect fire turrets

Can be treated as a boolean because 0 coerces to false

All droids
.retreatModeConstant(error)

At what level of damage does the droid retreat?

  • WZ_RETREAT_NONE - do or die
  • WZ_RETREAT_MEDIUM - at medium damage (50%)
  • WZ_RETREAT_HEAVY - at heavy damage (75%)
All droids
.sensorRangeNumber(tick)

The range of the droids sensors/CB.

Each droid will have an innate sensor ability, albeit relatively small. Sensor turrets will greatly increase the sensorRange.

All droids
.attackRangeNumber(tick)

If this droid has weapon turrets, what's the range of it's longest-ranged weapon?

Returns 0 if no weapons.

All droids
.attackModeConstant(error)

How aggressive is the droid?

  • WZ_ATTACK_NONE - hold fire
  • WZ_ATTACK_AGGRESSORS - return fire
  • WZ_ATTACK_AT_WILL - fire at will

All droids

.rangeModeConstant(error)

What range will the droid attack at?

  • WZ_RANGE_SHORT - prefer attack at short range
  • WZ_RANGE_OPTIMAL - prefer attack at optimal range
  • WZ_RANGE_LONG - prefer attack at long range

All droids

.weaponsArray(tick)

An array of weapon objects on this droid

All droids
.systemsArray(tick)

An array of systems (sensor, ECM, CB, etc) objects on this droid

All droids
.baysArray(tick)

An array of bomb/torpedo bay objects on this droid

VTOLs (not transports)

Naval (torpedoes?)

.propulsionConstant(tick)

What sort of propulsion is the droid using?

  • WZ_PROPULSION_HOVER
  • WZ_PROPULSION_WHEELS
  • WZ_PROPULSION_HALFTRACKS
  • WZ_PROPULSION_TRACKS
  • WZ_PROPULSION_VTOL (note: includes transports!)
  • WZ_PROPULSION_NAVAL (ships)
  • WZ_PROPULSION_LEGS (people)
All droids
.bodyString?(tick)

What sort of body does the droid have?

Probably return the ID of the body?

All droids

...