Yossarian 0 Posted December 12, 2006 Hi guys, I'm having some trouble getting a group of friendly soldiers to join my unit, under my command. Is there a way to do this in the Editor? I want the wounded group from the helo crash to join my unit once I get close to them. I've tried messing with triggers and waypoints and the Biki but with no luck... any ideas? Thanks, Share this post Link to post Share on other sites
Big Dawg KS 6 Posted December 13, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(units groupname) join player Be sure to name the group (the group in question consists of the units you want to join you) and replace groupname with the name you used. To name the group put this in the leader's init field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">groupname = group this For more information on the join command, look on the Biki. Share this post Link to post Share on other sites
Yossarian 0 Posted December 13, 2006 ok, so if I had a group of soldiers named soldier1, soldier2, etc... How would I name them as a group? select them all then double click and enter "group1" in the "name" field of the units dialog? Would I then place a trigger? So that once <player> enters the trigger area, "group1" joins me?<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group1 join player? And that would go in the Act. field of the trigger dialog? I was looking at that page on the Biki, but couldn't really figure out what to do with the information... I'm completely new at this. thanks for your help. Share this post Link to post Share on other sites
XCess 0 Posted December 13, 2006 a simpler way is to just create an array of unit names (essentially what the units groupname in Kyle's example does), the syntax for the join command using a standard array: [man1,man2,man3] join man4 obviously you would have to assign each unit a name in the editor, or ofcourse, as part of the spawn script if the units are spawned later in the mission. Hope all that made sense... haven't had enough sleep, and too much alcohol. Share this post Link to post Share on other sites
Yossarian 0 Posted December 14, 2006 I guess I'm just not sure which fields I should write all this stuff in. I don't know how to make a group of soldiers into an array. I won't have to open up the mission in notepad will I? here's what I've got so far, it's still not working: leader's init field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">groupname = crash Trigger, on activation by BLUFOR: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(units crash) join player Share this post Link to post Share on other sites
crashdome 3 Posted December 14, 2006 All the answers on in the previous posts, but there just needs to be some glue to get it all together. You can use a "Join" waypoint, or you can use a trigger. If you use a trigger, in the "Activation" field, you must type word for word: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(units group1) join player The leader of the friendly units has to have "group1" in the "Name" field for this command to work. To clarify something: the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">units command turns a groupname into an array of members i.e. [unit1, unit2, unit3...] Share this post Link to post Share on other sites
Yossarian 0 Posted December 14, 2006 ahhh, Brilliant! Thanks so much, that cleared things up. I was putting the groupname in the init field instead of the leader's "name" field. It's working beautifully now Thanks for your patience and help guys. This community is awesome! Share this post Link to post Share on other sites