Original Post
Hi. I am totally noob in scripting languages, so many aspects of this technology are like a divine revelation for me. Please be merciful.
I finally decided to stick with AS for my scripting purposes and just an hour ago did run through the docs.
Surpsrisingly most of it is quite comprehendable, thanks. But of course a few things are still vague for me.
Explanation needed for:
1 - What is a Module thing? What is the purpose behind this entity? I understand that it's some kind of arbitrary collection of script-functions. But it seems this point of view is superficial.
2 - The same about code-section. Can I say that code section == content of script.as?
3 - Let's assume that I have three threads(Environment, Tank1, Tank2). I want AS to provide external event handlers for tanks, and some weather-generation scripts for Environment. So, what is the best strategy for AS application? Obviously I need three contexts for every thread. I guess I have to know which script-functions belong to tank 1, and tank 2. Probably It can be done via function naming convention like plasmaAtackHandler1, plasmaAtackHandler2. Maybe this is what are modules for? ... the flow of mind my be continued, but I'd like to see the optimal solution from AS's design point of view.
I finally decided to stick with AS for my scripting purposes and just an hour ago did run through the docs.
Surpsrisingly most of it is quite comprehendable, thanks. But of course a few things are still vague for me.
Explanation needed for:
1 - What is a Module thing? What is the purpose behind this entity? I understand that it's some kind of arbitrary collection of script-functions. But it seems this point of view is superficial.
2 - The same about code-section. Can I say that code section == content of script.as?
3 - Let's assume that I have three threads(Environment, Tank1, Tank2). I want AS to provide external event handlers for tanks, and some weather-generation scripts for Environment. So, what is the best strategy for AS application? Obviously I need three contexts for every thread. I guess I have to know which script-functions belong to tank 1, and tank 2. Probably It can be done via function naming convention like plasmaAtackHandler1, plasmaAtackHandler2. Maybe this is what are modules for? ... the flow of mind my be continued, but I'd like to see the optimal solution from AS's design point of view.