I have been working on a fairly sizable SC2 project, and we are currently at 25,000 lines of code, about half of them written by me in galaxy script.
There are many, many things about it that allow you to code more effectively than the GUI. You can create triggers and add events to them dynamically. You can use function pointers and array pointers to code faster and more efficiently in many cases. You can use structs, though I prefer using the data table. It's far better organizationally, and encourages very abstract modular code, the more you get into it.
There's no need to put your galaxy in a custom script block inside of a trigger. You can create a custom script element much like a trigger, or function definition. It consists of just a text editor (to put your code in) and an input at the bottom for an initialization function. For this initialization function, it simply expects the name of a function you've defined with type void(), and it will run this initialization function during the load screen.
You can have as many of these custom script elements as you want to keep different modules of code separately, and you can give any/all/none of them initialization functions. A custom script element placed lower in the list can reference anything from the elements above it.
-
If you want to get into it, I recommend creating a single custom script element to contain all of your initialization. Use only a single initialization function, in this element. From there, create and execute triggers to initialize all of your other code modules.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@finiteturtles: Go
Yeah, no worries. If you want advice on anything specific in the future, I'll be happy to help.
I have been working on a fairly sizable SC2 project, and we are currently at 25,000 lines of code, about half of them written by me in galaxy script.
There are many, many things about it that allow you to code more effectively than the GUI. You can create triggers and add events to them dynamically. You can use function pointers and array pointers to code faster and more efficiently in many cases. You can use structs, though I prefer using the data table. It's far better organizationally, and encourages very abstract modular code, the more you get into it.
There's no need to put your galaxy in a custom script block inside of a trigger. You can create a custom script element much like a trigger, or function definition. It consists of just a text editor (to put your code in) and an input at the bottom for an initialization function. For this initialization function, it simply expects the name of a function you've defined with type void(), and it will run this initialization function during the load screen.
You can have as many of these custom script elements as you want to keep different modules of code separately, and you can give any/all/none of them initialization functions. A custom script element placed lower in the list can reference anything from the elements above it.
-
If you want to get into it, I recommend creating a single custom script element to contain all of your initialization. Use only a single initialization function, in this element. From there, create and execute triggers to initialize all of your other code modules.