User Tools

Site Tools


modding:xml:overlaytype

This is an old revision of the document!


Table of Contents

Overview

<OverlayType> defines a type of attachment or enhancement to space object instances. For example, the pteravore attack which attaches on to a ship and drains fuel is implemented as an OverlayType.

Basic Attributes

UNID= The UNID of this type.

Events

An overlay instance has the following events:

<OnCreate>

  • gSource: The object that has the overlay.
  • aOverlayID: The ID of the overlay being created.

<OnDamage>

This event is called when the overlay is hit. The following variables are defined.

  • gSource: The object that has the overlay.
  • aOverlayID: The ID of the overlay.
  • aArmorSeg: The armor segment hit on the object.
  • aAttacker: The object that fired the shot that hit us.
  • aCause: The object that hit us (generally the projectile object).
  • aDamageHP: The amount of damage (in hit points) that reached us.
  • aDamageType: The type of damage.
  • aHitDir: The angle from which the attack came.
  • aHitPos: The position where we were hit (in global coordinates).
  • aOrderGiver: The object that ordered the attack on us. This is generally the same as aAttacker but if an auton attacked us, this will be the controller of the auton (e.g., the player).
  • aWeaponType: The UNID of the weapon used.

<OnDestroy>

This event is called when the overlay is destroyed.

  • gSource: The object that has the overlay.
  • aOverlayID: The ID of the overlay being created.

<OnObjDestroyed>

The object that the overlay is on was destroyed. [apiVersion 14]

  • gSource is the object on which the item was installed.
  • aOverlayID is the ID of the overlay.
  • aObjDestroyed is the object that was destroyed (generally the same as gSource).
  • aDestroyer is the object that destroyed us.
  • aOrderGiver is the object that ordered the destruction. Generally this is the same as aDestroyer but in the case of autons, this is the controller of the auton.
  • aWreckObj if not Nil this is the wreck object that resulted from the destruction.
  • aDestroyReason this is the destruction cause.

<OnUpdate>

An overlay gets this event every 15 ticks.

  • gSource: The object that has the overlay.
  • aOverlayID: The ID of the overlay being created.
modding/xml/overlaytype.1369973055.txt.gz · Last modified: 2014/12/27 04:40 (external edit)