Template:LuaCallin: Difference between revisions
From Spring
Jump to navigationJump to search
temp fix |
tweak to new API named params |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
|prefix = addon. | |prefix = addon. | ||
|name = {{{name}}} | |name = {{{name}}} | ||
|args = {{{ | |args = {{{args|}}} | ||
|return = {{{return}}} | |return = {{{return|}}} | ||
|info = {{{ | |info = {{{info}}}}}</includeonly><noinclude>==Lua Callin usage example== | ||
<pre> | |||
{{LuaCallin | {{LuaCallin | ||
|name = | |name = AllowUnitTransfer | ||
| | |args = unitID, unitDefID, oldTeam, newTeam, capture | ||
|return = bool allow | |return = {{type|bool}} allow | ||
| | |info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted. | ||
</noinclude> | }}</pre> | ||
{{LuaCallin | |||
|name = AllowUnitTransfer | |||
|args = unitID, unitDefID, oldTeam, newTeam, capture | |||
|return = {{type|bool}} allow | |||
|info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted. | |||
}}</noinclude> | |||
Latest revision as of 14:42, 18 June 2016
Lua Callin usage example
{{LuaCallin
|name = AllowUnitTransfer
|args = unitID, unitDefID, oldTeam, newTeam, capture
|return = {{type|bool}} allow
|info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.
}}
addon.AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture)
return: bool allow
- Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.