ocal player = _player
for i = 0,9 do
local index = i
MousePosition.Player[player].Tribute.X[1][index] = MousePosition:AddTribute{Callback=function()MousePosition:Tribute_Callback(player,index,1,0,false)end}
MousePosition.Player[player].Tribute.X[2][index] = MousePosition:AddTribute{Callback=function()Mo
e dummy functions
function _OP_Forests_growTrees(_index)
return _OP_Forests:growTrees(_index);
end
function _OP_Forests_plantTrees(_index)
return _OP_Forests:plantTrees(_index);
end
function _OP_Forests_moveForester(_index)
return _OP_Fore
====table.remove======
''table.remove (_Table, [_Index,] )''\\
Entfernt einen **[[ scripting:tutorials:l... merischen]]** Eintrag aus dem Table ''_Table'' am Index ''_Index'' (standardmäßig Größe des Tables, also den letzten) und gibt den Wert des entfernten Eintrags zurück. Falls auf den Index ''_Index'' noch weitere Einträge folgen, werden d
====table.insert======
''table.insert (_Table, [_Index,] _Value)''\\
Fügt einen **[[ scripting:tutorials... umerischen]]** Eintrag in das Table ''_Table'' am Index ''_Index'' (standardmäßig Größe des Tables + 1, also ans Ende) ein. Falls ''_Index'' schon mit einem Wert belegt ist, wird dieser un
'_Table'' in einem String zusammen, beginnend bei Index ''_i'' (standardmäßig ''1'') und endend bei Index ''_j'' (standardmäßig die Größe des Tables). Die einze... ückgibt. Dabei wird ''_F'' in jeder Iteration ein Index-Wert-Paar übergeben, aufsteigend von ''1'' bis ''... le ''_Table'' zurück (also wie viele Einträge von Index ''1'' aufwärts ununterbrochen im Table sind). |
|
nn.
----
===== Tutorials =====
Die __[[tutorials:Index|Tutorials]]__ enthalten alles Wissenswerte, was e... ls sind in 3 Blöcke unterteilt:
* __[[tutorials:index#lua|Lua allgemein]]__
* __[[tutorials:index#s5-dedk|S5-DEdK Scripting]]__
* __[[tutorials:index#weitere_beispiele|Weitere Beispiele]]__
===== Anl
delt, hier seid ihr richtig.
Zum Lua allgemein [[Index]] gehen.
=====S5-DEdK Skripten=====
* Allgeme... n den Computergegner]]
* __[[tutorials:index#s5-dedk|S5-DEdK Scripting]]__
* __[[tutorials:index#weitere_beispiele|Weitere Beispiele]]__
===== Anl... h das was wichtig ist.
* __[[advancedtutorials:index|Anleitungen für Fortgeschrittene]]__
===== Nützl
le ''_Table'' zurück (also wie viele Einträge von Index ''1'' aufwärts ununterbrochen im Table sind).
Di... ard_library:table:insert |table.insert (_Table, [_Index,] _Value)]] und [[ scripting:reference:standard_library:table:remove |table.remove (_Table, [_Index,] )]] fügen einen **[[ scripting:tutorials:level1... umerischen]]** Eintrag in das Table ''_Table'' am Index ''_Index'' ein oder löschen ihn wieder heraus. Fü
assert(type(_Limit) == "number")
Counter.Index = (Counter.Index or 0) + 1
if _Show and CountdownIsVisisble() then
assert(false, "Start... e")
end
Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Ca... ("CountdownTick")
end
return Counter.Index
end
function StopCountdown(_Id)
if Counter.I
assert(type(_Limit) == "number")
Counter.Index = (Counter.Index or 0) + 1
if _Show and CountdownIsVisisble() then
assert(false, "Start... e")
end
Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Ca... ("CountdownTick")
end
return Counter.Index
end
function StopCountdown(_Id)
if Counter.
assert(type(_Limit) == "number")
Counter.Index = (Counter.Index or 0) + 1
if _Show and CountdownIsVisisble() then
assert(false, "StartCou... ible")
end
Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Ca... Job("CountdownTick")
end
return Counter.Index
end
function StopCountdown(_Id)
if Counter.
k or type(_Callback) == "function" )
Counter.Index = (Counter.Index or 0) + 1
if _Show and CountdownIsVisisble() then
assert(false, "Start... e")
end
Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Ca... ("CountdownTick")
end
return Counter.Index
end
function StopCountdown(_Id)
if Counter.I
ow)
assert(type(_Limit) == "number")
Counter.Index = (Counter.Index or 0) + 1
if _Show and CountdownIsVisisble() then
assert(false, "StartCountdown: ... y visible")
end
Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Ca... impleJob("CountdownTick")
end
return Counter.Index
end
StopCountdown = function(_Id)
if Counter