// OnDestroy trigger tells the parent asteroid to decrement spawned count by 1 trigger OnDestroy() { obj_id asteroid = getObjIdObjVar(self, "space_mining.parentRoid"); messageTo(asteroid, "handlePirateKilled", null, 0, false); return SCRIPT_CONTINUE; }