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.
disarm= The object will be unable to fire its weapons if this is “true”
paralyze= The object will be unable to thrust or rotate if this is “true”
spin= The object will turn clockwise at a fixed rate if this is true.
drag= This is the percentage that the object's velocity will be multiplied by twice every second.
absorbAdj= Specifies the percentages of damage taken that this overlay will absorb for each damage type. For instance, “100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100” means this overlay will absorb 100% damage taken for every damage type.
weaponSuppress= Specifies the damage types that this overlay will prevent the user from firing. “*” means that all weapon fire from the user will be blocked. “laser, kinetic” means that the user's laser and kinetic attacks will be suppressed.
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.