Jump to content
Sign in to follow this  
BLSmith2112

Shorter Way For Who Activates a script?

Recommended Posts

An example of an init I have in a mission:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[a1,"Sh_122_HE",0] exec "explos2.sqs"; [a2,"Sh_122_HE",0] exec "explos2.sqs"; [a3,"Sh_122_HE",0] exec "explos2.sqs"; [a4,"Sh_122_HE",0] exec "explos2.sqs"; [a5,"Sh_122_HE",0] exec "explos2.sqs"; [a6,"Sh_122_HE",0] exec "explos2.sqs"; [a7,"Sh_122_HE",0] exec "explos2.sqs"; [a8,"Sh_122_HE",0] exec "explos2.sqs"; [a9,"Sh_122_HE",0] exec "explos2.sqs"; [a10,"Sh_122_HE",0] exec "explos2.sqs"; [a11,"Sh_122_HE",0] exec "explos2.sqs"; [a12,"Sh_122_HE",0] exec "explos2.sqs";

Is there anyway to perhaps say [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, ,"Sh_122_HE",0] exec "explos2.sqs"? I hate changing all those lines for code for 1 change.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_list = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12];

{[_x,"Sh_122_HE",0] exec "explos2.sqs";}foreach _list;

Share this post


Link to post
Share on other sites

or:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{[_x,"Sh_122_HE",0] exec "explos2.sqs"} forEach [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]

~S~ CD

Share this post


Link to post
Share on other sites

So I could just throw those into an init field and it'll work?

Whoaza! Rock on thanks.

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  

×