Functions Documentation
View Function Edit Function
Name objIncOverlayData
Syntax (objIncOverlayData sObj overlayID attrib [increment]) -> newValue
Argument List sObj: spaceOjbect the overlay is on
overlayID: the overlay to access
attrib: the name of the data attribute to work with
[increment]: number to add to value that is already there
Returns newValue: the value that the attribute was set to
Category overlay
Description Shortcut function that adds a value to an overlay attribute without having to get the attribute first.
Example From MiscItems.xml
; Create a barrel of waste every 90 cycles (45 seconds)
(if (geq (objIncOverlayData gSource aOverlayID "counter") 90)
  (block (left)
    (setq left (objIncOverlayData gSource aOverlayID "wasteCount" -1))
    (objAddItem gSource (itmCreate &itRadioactiveWaste; 1))
    (objSetOverlayData gSource aOverlayID "counter" 0)
    (plyMessage gPlayer "Uranium rod consumed")
    (if (eq left 0)
      (objRemoveOverlay gSource aOverlayID)
Comment Not sure what it does when increment is not provided.