User Tools

Site Tools


4rpl:commands:func_warepacketsent

Index

:!: Available in version 1.3 and later.

:_WarePacketSent

Description

“:_WarePacketSent” is invoked whenever a custom unit sends a ware packet. Note that only wares are supported, not energy.

There is an implicit variable named “_DATA” that is available for use when the callback is made. For this callback, _DATA is a table that contains two keys, “unit” and “ware”. The “unit” value holds the uid for the unit that the ware packet was sent to. The “ware” value holds the ware type that was dispatched. See Set AddAsWareHolder for a list of ware types.

Example

:_WarePacketSent
   <-_DATA["unit"] ->unit
   <-_DATA["ware"] ->ware
   traceallsp("Ware Sent to " <-unit " of type " <-ware)

Index

4rpl/commands/func_warepacketsent.txt · Last modified: 2021/02/07 15:59 by virgilw