Jump to content
Sign in to follow this  
iconoclastdx

Combining script files??

Recommended Posts

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×