Java I have no problem with, but lua is a bit of a learning curve for me.
A few questions to get me started:
In the lua ai tutorial/wiki it gives this snippet:
Code: Select all
function gadget:GameStart()
for _,t in ipairs(Spring.GetTeamList()) do
local _,_,_,isAI,side = Spring.GetTeamInfo(t)
if Spring.GetTeamLuaAI(t) == gadget:GetInfo().name then
Spring.Echo("Team "..t.." assigned to "..gadget:GetInfo().name)
local pos = {}
local home_x,home_y,home_z = Spring.GetTeamStartPosition(t)
end
end
end
line 1 is a call in (event/function)?
line 2 is basically for each team as key (_) value (t)
line 3 is setting local variables based of an array (table?) return from Spring.GetTeamInfo
Is there any good lua intros? I had a look through the lua site docs, but is there anything better?
Is this complete/accurate: http://springrts.com/wiki/LuaCallinReturn
How do I reload a lua AI? Is it /luarules reload
Is there a callin for when an AI is reloaded?
Is there a callin for when Spring is finished loading but the game is not started?
Thanks