donkassim 10 Posted January 11, 2015 Hello all Is there any way I can add an option for the player to recruit a high command squad and also recruit AI players as part of the players team ? Thanks Share this post Link to post Share on other sites
jshock 512 Posted January 11, 2015 For recruitment: _unit addAction [ "Recruit My Team!", { { _x joinSilent group (_this select 1); _x removeAction (_this select 2); } forEach units group (_this select 0); }, [], 5, true, true, "", "_this distance _target < 5" ]; Share this post Link to post Share on other sites
donkassim 10 Posted January 11, 2015 Where should I add this code my friend ? Share this post Link to post Share on other sites
jshock 512 Posted January 11, 2015 In whatever units init fields you would want to be recruited (replace "_unit" with "this"), or if your spawning in those units via script then just apply this action in that script along with the unit creation. Share this post Link to post Share on other sites
donkassim 10 Posted January 11, 2015 And will I get a menu seclection to recruit ai or ? Will add this code to the player unit that am playing as Share this post Link to post Share on other sites
jshock 512 Posted January 11, 2015 Well, no, it just adds a scroll menu action to spawned units that you can walk up to and execute the action to "recruit" them. Share this post Link to post Share on other sites
donkassim 10 Posted January 11, 2015 Cool thanks it helps will try it out and advise Share this post Link to post Share on other sites
easyeb 137 Posted January 14, 2015 (edited) I've been fiddling with this and not getting it to work. I get the action "Recruit my team!" but no recruitment is happening :( Using the code in the init field. Edit: Oh, it works if I have no squads in High Command, but if I already do, it does not work. Edited January 14, 2015 by EasyEB Share this post Link to post Share on other sites
das attorney 857 Posted January 14, 2015 [_x] joinSilent group (_this select 1); ! Share this post Link to post Share on other sites
jshock 512 Posted January 14, 2015 [_x] joinSilent group (_this select 1);! Dammit, I do it every time, thanks Das! Share this post Link to post Share on other sites
das attorney 857 Posted January 14, 2015 np mate - I forget about that one as well from time to time :) Share this post Link to post Share on other sites
jshock 512 Posted January 14, 2015 It should really accept an object or an array of objects, like lots of other commands out there, but I digress. Share this post Link to post Share on other sites