iconoclastdx 5 Posted February 5, 2014 Disclaimer: I am baby-brand-new to scripting. I have way to many script files. Triggers call scripts, units call scripts, waypoints call scripts, addActions call scripts, and they all call separate little .sqf files. Everything is working fine (thankfully) but I can tell that I'm doing it all wrong. Is there a way that I can combine all these little scripts into a few .sqf files so I don't have to have manage hundreds of separate script files? I think that I could make functions and call those from the various places but I'm not sure. Any ideas? Examples? Advice? Share this post Link to post Share on other sites
fight9 14 Posted February 5, 2014 Having separate files is WAY easier to manage than trying to combine them. The only way I know how, would be to make some of them into functions and processing them before the game and calling them throughout. More trouble than its worth. Just organize your scripts into separate files if you can. Thats what I do. Share this post Link to post Share on other sites
trnapster 12 Posted February 5, 2014 The best way to manage script files imo is: create a nice folder structure and sorting them depending on their function. Create seperate init files Always create a comment header in your sqf files containing the author, parameters and return value. Compile your files into functions. This also adds a little bit more hackerprotection because of compileFinal Examples: http://abload.de/img/folderstructure3is1k.png http://abload.de/img/initstructureo6s6v.png http://abload.de/img/scriptstructurek3s7m.png Share this post Link to post Share on other sites
iconoclastdx 5 Posted February 8, 2014 Thanks for the trnapster! Very helpful! Share this post Link to post Share on other sites