Jump to content
Sign in to follow this  
muttly

Calling my scripts from script folder

Recommended Posts

Hi guys

Bit of noob question but how do i call all my scripts from a script folder my mission folder full with scripts getting messy iam guessing i just call the folder from my init.sqf but what do i type exactly:o

thanks

Share this post


Link to post
Share on other sites

You can't execute them all at once, you need to do it separately:

execVM "scripts\stuff1.sqf"
execVM "scripts\stuff2.sqf"
execVM "scripts\stuff3.sqf"

Share this post


Link to post
Share on other sites

I guess this should work also:

_array = [
[[var1, var2], "scripts\stuff1.sqf"],
[var3, "scripts\stuff2.sqf"],
[[var2, var4], "scripts\stuff3.sqf"]
];
{
_nul = (_x select 0) execVM (_x select 1);
}foreach _array;

Instead of writing a line for each script, collect parameters and path into a nested array and use the foreach to start all scripts.

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  

×