I moved on to learn Lua and troll thoroughly around the Wiki and did my first experiments. Ex. the one found in: https://springrts.com/wiki/Lua:Tutorial_GettingStarted
Then I moved to something serious and from the Callins list: https://springrts.com/wiki/Lua:Callins I found:
Code: Select all
*.DefaultCommand (type, id)
*.CommandNotify (cmdID, cmdParams, cmdOptions)
Code: Select all
function widget:CommandNotify (cmdID, cmdParams, cmdOptions)
--Spring.Echo ("CommandNotify(): " .. cmdID .. " | " .. cmdParams .. " | " .. cmdOptions)
Spring.Echo ("CommandNotify(): " .. cmdID)
return false
end
I could ask what the parameters are, and that would be helpful, but that would only help me solve this issue. What about when I run into not knowing the params of the next function and the next and the next? I don't want to spend all my time nagging people here in the forums nor have to wait.
So, my question is, how can I find out more info about the Lua interface - how can I learn what types of Lua objects the engine is providing/expecting from my Lua script?
Note: I am a professional Software developer and have basic but decentish knowledge of C++. I can troll through some of the engine's source code, if it doesn't require to correlate a maze of functions in files here and there.