Ghosticus 12 Posted July 4, 2015 I'm looking for a way to add squad members to High Command, like you can in DUWS with team yellow. How can I go about doing this? Any search turned up no good results. Share this post Link to post Share on other sites
Larrow 2820 Posted July 4, 2015 See the hc# commands on the wiki, specifically hcSetGroup. Share this post Link to post Share on other sites
Ghosticus 12 Posted July 4, 2015 See the hc# commands on the wiki, specifically hcSetGroup. I got something.. sort of. Instead of adding to HC, the squad member just dies. Do I need to add HC Modules to the mission? Share this post Link to post Share on other sites
Larrow 2820 Posted July 5, 2015 You need the HC-commander to enable highCommand mode, without it you can add groups via hcSetGroup and something shows up when your in HC mode but it does not work correctly. You need to place a HC-subordinates module else it seems any groups nearby will automatically be given to you to control from the quick test i just did. With the subordinates module only the groups synced to it will be available at start, allowing you to add others via the hcSetGroup command. As a quick test, place down a player, sync him to a HC-commander module, sync commander module to a HC-subordinates module, place a group do not group to player or sync to subordinate. Preview the mission, go into HC mode (think ctrl + space is default?) as you have no subordinates you should see no change, place your crosshairs over one of the group, bring down the debugconsole and run. player hcSetgroup [group cursortarget] You should see the group appear as a selectable HC group along the bottom of your screen when in HC mode. Share this post Link to post Share on other sites
Ghosticus 12 Posted July 5, 2015 You need the HC-commander to enable highCommand mode, without it you can add groups via hcSetGroup and something shows up when your in HC mode but it does not work correctly.You need to place a HC-subordinates module else it seems any groups nearby will automatically be given to you to control from the quick test i just did. With the subordinates module only the groups synced to it will be available at start, allowing you to add others via the hcSetGroup command. As a quick test, place down a player, sync him to a HC-commander module, sync commander module to a HC-subordinates module, place a group do not group to player or sync to subordinate. Preview the mission, go into HC mode (think ctrl + space is default?) as you have no subordinates you should see no change, place your crosshairs over one of the group, bring down the debugconsole and run. player hcSetgroup [group cursortarget] You should see the group appear as a selectable HC group along the bottom of your screen when in HC mode. That worked. Now, if you'll bear with me as I try to fully understand. I want to add an action to a flag pole that assigns the player's team yellow to a HC group. DUWS groups Team Yellow using this: _arrayOfYellowUnits = []; { _team = assignedTeam _x; if (_team == "YELLOW") then { _arrayOfYellowUnits = _arrayOfYellowUnits + [_x]; } } forEach units group player; if (count _arrayOfYellowUnits<1) exitWith {hint "No units assigned to Yellow team"}; _newGroup = createGroup WEST; _arrayOfYellowUnits join _newGroup; player hcSetGroup [_newGroup,""]; The code properly checks Team Yellow for units, but will kill any unit trying to be transfer to HC. How can I edit the following to not kill off units? _newGroup = createGroup WEST; _arrayOfYellowUnits join _newGroup; player hcSetGroup [_newGroup,""]; Is the createGroup/_newGroup the culprit? Share this post Link to post Share on other sites
Larrow 2820 Posted July 5, 2015 Im not getting that behavior. I just copied the code from your last post and put it in a addaction for the player. A HC-commander module synced to the player, commander module synced to a HC-subordinates module which has nothing synced to it. Started preview with me and a normal group of 5 men. On using the action any group members in team yellow left the group and became a new group under HC. Share this post Link to post Share on other sites
Ghosticus 12 Posted July 5, 2015 Im not getting that behavior.I just copied the code from your last post and put it in a addaction for the player. A HC-commander module synced to the player, commander module synced to a HC-subordinates module which has nothing synced to it. Started preview with me and a normal group of 5 men. On using the action any group members in team yellow left the group and became a new group under HC. I found the problem. I'm using 'bon_recruit_units" to add squad mates. These units die on transfer. Any units I give myself in the editor transfer with no issues. I'm going to dig trough BON's script to find what's killing them off. Thanks a lot for your help trouble shooting. I should have tested this out on unscripted spawns first. Share this post Link to post Share on other sites
Larrow 2820 Posted July 5, 2015 No worries, glad you found your problem. Share this post Link to post Share on other sites
Ghosticus 12 Posted July 5, 2015 GOT IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! For the sake of how fun this script is, I will be uploading it with all credits to the authors of the original scripts. I just meshed them up and stuff :) :) :) Share this post Link to post Share on other sites
Camdean 0 Posted September 10, 2017 Anyone know how to stop the recruited troops from dying when I try and switch them to HC mode using the same code as above? I am using BONS recruitment script to give me AI, however when I succsefully put the yellow team into HC using the code above (attached to flagpole) they die. EDIT1: I have tried the following to try and get this working but nothing seems to be doing what I need.. 1. I tried recruiting in DUWS and then using the BON recruitment to recruit a soldier from each separate script, when I use the DUWS menu or the code mentioned above on a flagpole they always kill the AI recruited from BONS script but not the DUWS recruited unit, this is when attempting to convert yellow squad to HC. 2. I tried attaching the recruitment script from DUWS to a flagpole just to see if I could get that to work but it wont let me access the menu, the only time I can get that menu is once the DUWS HQ has been set and the officer has spawned inside, he has the menus attached to him. I need to be able to spawn AI and set them into HC squads just like DUWS but be able to place the recruitment access point where I want to and in multiple locations. Help really appreciated, thanks. Share this post Link to post Share on other sites
Yeti88 0 Posted September 11, 2017 (edited) I need this too, been trying for a few weeks on and off to get that working, real pain in the ass. Edit:: I am going to try using a different recruitment script, maybe that will work, I shall report back soon. Edited September 12, 2017 by Yeti88 Plan B Share this post Link to post Share on other sites
Yeti88 0 Posted September 12, 2017 Ok update on how I got this working.. I removed BONS recruitment script and switched to the Simple_AI_Recruitment_Dialog_Script and it can put your yellow squad into HC without killing them. Share this post Link to post Share on other sites