OnAsteroidSelected(id)
This will be called every time an asteroid is selected, not clicked. It took me a while to realise that, so I'm telling you. By selected, I mean every time you click on an asteroid that isn't the one you are currently examining. As an example: You have a map with four 'roids, 0, 1, 2, 3. If you click on 1, this function will be called, and 'id' will be 1. Every time you type 'id' as a variable from now on until it is changed (inside this function? will check that), it will be 1. If you then click on 3, it will be called again, and 'id' will be three. If you doubleclick on 2, the function will be called THE FIRST TIME YOU CLICK, AND THAT TIME ONLY. 'id' will be 2. If you then click on 1, it will be called again, and 'id' will be 1, etc.
File attached: OnAsteriodSelected demo.lua
Every time OnAsteroidSelected() is called, a message box will display which asteroid was clicked, and also the number of times the function has been called.
OnMouseLeftClicked(x, y)
POSSIBLY COMING SOON
OnMouseRightClicked(x, y)
POSSIBLY COMING SOON