Jump to content
Theassassinzz

Is a function more usefull

Recommended Posts

So I have a script that spawns a Cargo drop out of a plane. It has commands in it that only get used once or twice through out my system.

My question is: Is it worth it to make these into functions that are just called, or should I just keep these commands inside the script?

Share this post


Link to post
Share on other sites

Once or twice being a called not really a need for a function. But, if you can why not?

Share this post


Link to post
Share on other sites

It depends.  If they are functions that can be ran within the script, and you don't need them elsewhere, then don't bother.  If you need access in another script, then yes, define them in cfgFunctions or by some other method.

Share this post


Link to post
Share on other sites

Could make them a function inside the script, that way on the fly changes can be made

 

fn_myFunction = {};

[] call fn_myfunction;

fn_myfunction = {hint 'forgot to write anything'};

[] call fn_myFunction;

 

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

×