Thanks to you guys I have now created my first scripts.
What I'm working on at the moment are two scripts to help me with the Strakha cloaking.
I already managed to read the player's ship class and I also can read and write HUD colors. I need that because I want to create the Wing Commander 3 cloaking thing as a script. I already managed to make most of the HUD black and white (except the colors of ships on the radar and the targeting brackets), and next I'll try if it is possible to make the rest happen.
Having some experience with programming/script languages helped me a lot, LUA really isn't hard. It is also quite pleasant sometimes, the syntax is quite easy.
But... I don't like that they decided to call an array "table", that confuses the hell out of me since I work with databases all day
And most important: WHO THE F*** thought it was a good idea to let arrays start with one? Fortran was that way and it sucked.
Whatever. It works and I'm now learning about all the objects and how they work.
What I don't understand yet is the hook structure, despite reading the tutorial.
I already got a scripting table that looks like this:
$Global hooks:
$GameInit
[
.. some methods that are used by Saga's HUD scripting
....
]
$HUD:
[
... triggers that use the functions defined above, for making the cool weapons display,
.....
....here I put my stuff that changes the color of all gauges depending on the ship type of the player (if playerShip.class == "Strakha#Inv") etc.
]
#End
Now I want to have that Conditional Hook thingie that triggers when there is a ship collision involving the player. Where do I put it? Everything I tried produced and error saying something like "#End expected" or just did nothing.