Lua in SpringRTS/Callouts

Callouts are just functions defined in Spring that you can run at any point. The difference between callins and callouts is that callins are practically event invokers while callouts are functions that are ready to be used by you. The nature of callous is exactly the same with any function. They can return values, they can change values or both. Keep in mind that the synced/unsynced theory should still be taken in consideration.

Trying for example to change the value of a game parameter via a callout in a widget is not permitted.

Example of callout: In the above example we pass unitID as an argument to function GetUnitTeam. GetUnitTeam returns the ID of the team which we store to our variable(teamID).