Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Lua in SpringRTS/Callins/UnitDestroyed()

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

UnitDestroyed() Description Runs when a unit gets destroyed. That can mean that either the unit got killed by an enemy or that it self destructed itself. In unsynced mode the callin gets invoked whenever one of your units gets destroyed. In synced mode it invokes for any unit in the game. Return values integer unitID, integer unitDefID, integer unitTeam Usage example function widget:UnitDestroyed(unitID, unitDefID, unitTeamID, attackerID) Spring.Echo("Unit "..unitID.." from team "..unitTeamID.." just got destroyed by enemy unit "..attackerID) end Related UnitCreated()