Coolinator 10 Posted November 16, 2014 im really confuse how to use the "setgroupid" code for multiplayer. >_< In my missions there's two squads and there's a squad leader for each squad. When i go to preview, it just shows for the "Alpha1-1" for the first squad name, then for the second squad name is "Alpha1-2" How do i make it to just "Alpha" name for the first squad, and "Bravo" for the second squad? Also, how do i change the name of the first squad leader to "Alpha Team leader", and the second squad leader name to "Bravo Team Leader"? Plz show step by step, im not really good at scripting. :( Share this post Link to post Share on other sites
Lala14 135 Posted November 16, 2014 [[group <player/name>,["<group name>"]],'setGroupID',true,true] spawn BIS_FNC_MP; //eg [[group player,["Alpha 3-3"]],'setGroupID',true,true] spawn BIS_FNC_MP; Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 { [ [_x, [str _x]], "setGroupId", true, true ] call BIS_fnc_mp; } forEach [alpha,bravo]; Oops, ninja'd Share this post Link to post Share on other sites
Coolinator 10 Posted November 16, 2014 [[group <player/name>,["<group name>"]],'setGroupID',true,true] spawn BIS_FNC_MP; //eg [[group player,["Alpha 3-3"]],'setGroupID',true,true] spawn BIS_FNC_MP; How do i initialize this??? ---------- Post added at 02:59 ---------- Previous post was at 02:57 ---------- { [ [_x, [str _x]], "setGroupId", true, true ] call BIS_fnc_mp; } forEach [alpha,bravo]; Oops, ninja'd 4th time i asked this lol, im really sorry iceman >_<, How do i initialize this properly? Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 In a server script. init.sqf execVM "serverScript.sqf"; serverScript.sqf /* Assuming you named the groups in the editor. eg; alpha = group this, bravo = group this etc etc */ if (!(isServer)) exitWith {}; myGroupArray = [alpha,bravo,charlie,delta]; { [ [ _x, [str _x] ], "setGroupId", true, true ] call BIS_fnc_mp; } forEach myGroupArray; Share this post Link to post Share on other sites
das attorney 858 Posted November 16, 2014 Be wary of using (_this select 3) as true. As per the wiki entry, it can mess up your game if you have lots of people joining and leaving. Obv if this isn't the case then go ahead. Just be aware it can slow down the game if you have lots of use of it coupled with lots of clients (players). Share this post Link to post Share on other sites
Coolinator 10 Posted November 16, 2014 In a server script.init.sqf execVM "serverScript.sqf"; serverScript.sqf /* Assuming you named the groups in the editor. eg; alpha = group this, bravo = group this etc etc */ if (!(isServer)) exitWith {}; myGroupArray = [alpha,bravo,charlie,delta]; { [ [ _x, [str _x] ], "setGroupId", true, true ] call BIS_fnc_mp; } forEach myGroupArray; THnx!!!! "/* Assuming you named the groups in the editor. eg; alpha = group this, bravo = group this etc etc */" i also need help with that? because i have no clue how it works lol. What do you mean by alpha = group this? is there another code i need to use? Share this post Link to post Share on other sites
Lala14 135 Posted November 16, 2014 so put in the squad leader's init: alpha = group this; Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 You guys should come hang out. Links in the sig =) Share this post Link to post Share on other sites
das attorney 858 Posted November 16, 2014 You guys should come hang out. Links in the sig =) Maybe - you know how I don't like people? There won't be people though will there? Did I say I don't like people? ;) Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 It's okay. No one here likes people. We're growing on one another though =) Share this post Link to post Share on other sites
das attorney 858 Posted November 16, 2014 You know that I only talk to you as you live out in the arse end of nowhere and probably hate general society as much as I do. ;) Share this post Link to post Share on other sites
Coolinator 10 Posted November 16, 2014 so put in the squad leader's init:alpha = group this; Ahh ty so much!!!! :) Share this post Link to post Share on other sites
das attorney 858 Posted November 16, 2014 I still hate general society. Share this post Link to post Share on other sites
Outlawz7 1 Posted November 16, 2014 I just use " pgrp1=group this; pgrp1 setGroupID ["Alpha"]; " in the unit's init field, of course that may have issues with reinitializing on JIP. Worth noting that setGroupId has global arguments. https://community.bistudio.com/wiki/setGroupId Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 (edited) But it's effects are local? Nvm, init fields :) Edited November 16, 2014 by Iceman77 Share this post Link to post Share on other sites
cuel 25 Posted November 16, 2014 Init fields are fine for setGroupID, for your second question (I assume that you mean in role selection) you just change the "description" of your unit. Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2014 Yup. Well, unless he needs to change the id on the fly. Share this post Link to post Share on other sites