Ruckus 0 Posted December 30, 2006 I've been messing around with some scripts and I haven’t been able to find a answer to a question and hope someone has either done this or has the knowledge to do this. I'm calling a script from a trigger: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[trigger1,G1,"east"]exec"creategroup.sqs" I'm able to get the script to create a group and add units to it without any trouble (with local variables).  The question I have is I'd like to pass a variable (G1 in this case) so the script can use this variable name for the created group, so I might be able to reference it later in the map. I'm unsure how to get the script to use "G1" as the name of the group.  I assume that the variables passed to the script are the contents of those variables and not pointers per se. I have not initialized "G1" as a group variable, I’d just like the script to use the name that I pass on.  Does anyone know, or has anyone done something like this before? Any help is appreciated Share this post Link to post Share on other sites
moricky 211 Posted December 30, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format ["%1 = creategroup %2",_this select 1,_this select 2]; Script will see it as G1 = creategroup east. I suppose that third parameter in script is side of the group. Share this post Link to post Share on other sites
Ruckus 0 Posted December 30, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format ["%1 = creategroup %2",_this select 1,_this select 2]; Script will see it as G1 creategroup east. I suppose that third parameter in script is side of the group. Thanks Gaia.  I tryed this method as I had seen this used in OFP code,  but the wiki showed using "{ }" marks instead of the quote marks.  When I couldn't even get the example to work, I assumed I didn't understand something. I'll give that a try. Thanks again  Share this post Link to post Share on other sites
Ruckus 0 Posted December 31, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format ["%1 = creategroup %2",_this select 1,_this select 2]; Script will see it as G1 creategroup east. I suppose that third parameter in script is side of the group. thanks it works fine....I had to put quotes around the G1 variable, then it works as you said. Share this post Link to post Share on other sites