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/UnitCreated()

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

UnitCreated() Description Runs when a unit instance is being made. In practise that can be a unit that just got spawned or a unit that started being built. In unsynced mode the callin gets invoked whenever an instance of your units is made. In synced mode it invokes for any unit in the game. Return values integer unitID, integer unitDefID, integer unitTeamID, integer builderID Usage example function widget:UnitCreated(unitID, unitDefID, unitTeamID, builderID) Spring.Echo("Unit "..unitID.." from team "..unitTeamID.." just got created by "..builderID) end Related UnitDestroyed()