Lua:Callins: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
→Unsynced Only: ugly is ugly
Flozi (talk | contribs)
m strip types
Line 123: Line 123:
{{LuaCallin
{{LuaCallin
|name = PlayerChanged
|name = PlayerChanged
|params = number playerID
|params = playerID
|return = none
|return = none
|description = Called whenever a player's status changes e.g. becoming a spectator.
|description = Called whenever a player's status changes e.g. becoming a spectator.
Line 132: Line 132:
{{LuaCallin
{{LuaCallin
|name = AllowUnitCreation
|name = AllowUnitCreation
|params = number unitDefID, number builderID, number builderTeam, <br/> number x, number y, number z, number facing
|params = unitDefID, builderID, builderTeam, x, y, z, facing
|return = bool allow
|return = bool allow
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.
}}
}}

Revision as of 23:18, 27 December 2013

Lua Callins

Common

addon.Initialize()
return: none

{{{info}}}


addon.Shutdown()
return: none

{{{info}}}


Unsynced Only

Inside these functions, you can use the Lua OpenGL Api to draw graphics.

addon.DrawGenesis()
return: none

{{{info}}}


addon.DrawWorldPreUnit()
return: none

{{{info}}}


addon.DrawWorld()
return: none

{{{info}}}


addon.DrawWorldShadow()
return: none

{{{info}}}


addon.DrawWorldReflection()
return: none

{{{info}}}


addon.DrawWorldRefraction()
return: none

{{{info}}}


addon.DrawScreen()
return: none

{{{info}}}


addon.DrawScreenEffects()
return: none

{{{info}}}


addon.DrawLoadScreen()
return: none

{{{info}}}


addon.DrawInMinimap()
return: none

{{{info}}}


Custom Object Rendering

For the following calls drawMode can be one of the following, notDrawing = 0, normalDraw = 1, shadowDraw = 2, reflectionDraw = 3, refractionDraw = 4.

addon.DrawUnit()
return: none

{{{info}}}


addon.DrawFeature()
return: none

{{{info}}}


addon.DrawShield()
return: none

{{{info}}}


addon.DrawProjectile()
return: none

{{{info}}}


Synced - Unsynced Shared

addon.PlayerChanged()
return: none

{{{info}}}


Synced Only

addon.AllowUnitCreation()
return: bool allow

{{{info}}}