Jump to content
zuff

Group Management Script

Recommended Posts

Zuff's Group Management Script 1.1

grpManagement.png

About

This script gives the player the ability to leave and join groups, as well as become or stop being Group Leader. Player gets an option from the scroll-menu to open "Groups Menu". In this menu you get contextual options depending on whether or not you're in a group or are group leader. These options are:

  • Leave Group = Leaves current group
  • Join Group = Joins Group of Unit you are looking at AND near. Distance can be changed in "scripts\groupsMenu\groupActions.sqf" here:

GRPMNU_joinGroup = _caller addAction["<t color='#EB7FAF'>Join Group</t>", "scripts\groupsMenu\joinGroup.sqf", nil, -998, false, false, "", "[b][color="#FF0000"](cursorTarget distance _this) < 4[/color][/b] && (count units group _this) == 1 && side cursorTarget == side _this"];

You can change "4" to any number.

  • Become Group Lead = Become group leader of your current group
  • Step Down as Group Lead = Stop being group leader and randomly assign another group member as leader
  • Exit Groups Menu = Leaves this current menu

How it Works

It's all done through addActions. It's fairly simple and was needing it for a mission I'm working on so I'd thought I'd release it separately for those who may also want it.

Should be Multiplayer and JIP compatible, let me know if it isn't.

If you have any suggestions or problems, please post!

Download

Installation

Copy the "scripts" folder into your mission folder.

Add this to your init.sqf:

[player] execVM "scripts\groupsMenu\initGroups.sqf";

And you're done! Try the sample mission if you'd like to quickly test the script.

Issues

  • The only issue is when after leaving a group, there is a brief delay before the addAction "Join Group" reappears. Not sure if this is something that I can fix or if it's just Arma related.

Changelog

  • 4/30/13 - 1.0 Released
  • 5/2/13 - 1.1 Released
    - Fixed: Player no longer can use action on own dead body after respawn
    - Fixed: Cleaner code for init.sqf (moved respawn code to initGroups.sqf)

Edited by zuff
updated to version 1.1

Share this post


Link to post
Share on other sites

Nice one, simple and does the job. Integrated it into my MPMission today and will report feedback once some of my players have tested it.

Edit:

Works fine and is quite handy. I have it running on a dedicated server MPMission domination style and no problem. I'll have to find a way to limit "become group leader", maybe based on rank, but otherwise it's doing what's intended :)

Edited by Twix

Share this post


Link to post
Share on other sites

Very handy/nice script mate, cheers! :D

Dirty Haz

Share this post


Link to post
Share on other sites
Nice one, simple and does the job. Integrated it into my MPMission today and will report feedback once some of my players have tested it.

Edit:

Works fine and is quite handy. I have it running on a dedicated server MPMission domination style and no problem. I'll have to find a way to limit "become group leader", maybe based on rank, but otherwise it's doing what's intended :)

I'll look into a way to limit that option, let me know if you figure out a way how. An easy way to disable it for now is to open groupActions.sqf and comment out lines 8 and 9.

Very handy/nice script mate, cheers! :D

Dirty Haz

Thanks!

Share this post


Link to post
Share on other sites

Have you thought about making a dialog version of this?

Dirty Haz

Share this post


Link to post
Share on other sites

a dialog with a list of groups to join ... yeah I buy :rolleyes:

by the way I just included your script on my server running a modified version of ahoy world I & A

will tell you if I find bugs tonight

Edited by holo89

Share this post


Link to post
Share on other sites
Have you thought about making a dialog version of this?

Dirty Haz

Yes. Mickie Boy and I are talking about it. We'll see how it works out.

a dialog with a list of groups to join ... yeah I buy :rolleyes:

by the way I just included your script on my server running a modified version of ahoy world I & A

will tell you if I find bugs tonight

Good deal! I have a new version I'll push out soon which should fix a few little things, like being able to use the groups menu on your OWN dead body after respawn :P

Share this post


Link to post
Share on other sites

Oh, this is very nice. Good one, zuff!

Share this post


Link to post
Share on other sites

Updated to version 1.1

Changelog:

5/2/13 - 1.1 Released

Fixed: Player no longer can use action on own dead body after respawn

Fixed: Cleaner code for init.sqf (moved respawn code to initGroups.sqf)

Share this post


Link to post
Share on other sites

Again, thanks Foxhound!

Share this post


Link to post
Share on other sites

Righty chaps - already started the Dialog version for Zuff - seems to be working so far.

Zuff - once i've finished the basic version ill throw you a pm...

Edit update -

https://dl.dropboxusercontent.com/u/17725328/BIS_forum/groupMenu.jpg (113 kB)

Edit Update - Newest Pic - Zuff let me know what you think

https://dl.dropboxusercontent.com/u/17725328/BIS_forum/GroupMenuNew.jpg (235 kB)

Edited by Mikie boy

Share this post


Link to post
Share on other sites

Is it possible to get a database driven version of this? Say for example all groups and players within said group being saved to a database? This way when players create a group/clan and join a group/clan they only have to do it once? Or is this more of an on the fly grouping system where every time the server or mission reboots they need to create groups again?

Share this post


Link to post
Share on other sites
Is it possible to get a database driven version of this? Say for example all groups and players within said group being saved to a database? This way when players create a group/clan and join a group/clan they only have to do it once? Or is this more of an on the fly grouping system where every time the server or mission reboots they need to create groups again?

It is "on the fly".

Anyone know if this is beta compatible?

It is beta compatible.

Share this post


Link to post
Share on other sites

Great Script and thank you for sharing with the community.

Question/Bug Report, Group Management disappears if a user joins the server, interacts with the server, leaves and returns. Any Player that joins, leaves and returns, loses the Group Management Action.

Is this a known bug and is there a fix?

@Mikie Boy, have you completed that menu system and can you share it?

I do not see any revisions or responses to previous posts/requests, has this script/mod been abandoned?

Edited by Hajimoto

Share this post


Link to post
Share on other sites

I'm getting multiple "groups menu" lines in my action menu. One extra for each time a player has respawned. Is there a way to resolve this?

Share this post


Link to post
Share on other sites

Also this is not running on client machines , only on the host. Would this benefit from the new "BIS_fnc_MP" command?

I'm thinking in the init.sqf add the following instead of what we have:

Replace:

[player] execVM "scripts\groupsMenu\initGroups.sqf";

player addEventHandler ["Respawn", {

[player] execVM "scripts\groupsMenu\initGroups.sqf";

}

];

With:

["scripts\groupsMenu\initGroups.sqf", BIS_fnc_execVM, true, true] spawn BIS_fnc_MP;

Do I need the event handler line for respawns? And if so should I use the bis_fnc version?

Share this post


Link to post
Share on other sites

I got a little problem with this:

I'm using the Group Management Script in DUWS for multiplayer (as there's no function to add other players to your group/squad). But everytime I die, another entry of the group menu appears in the side menu.

Another problem is that the group menu only appears the first time I start DUWS as host. If I resume later, the group menu entry is completely gone. Only if I restart the mission it reappears.

#edit: the latter problem has been resolved by changing the used code in the init.sqf.

Edited by Pergor

Share this post


Link to post
Share on other sites

Does anybody know how i may utilise this so that i can join groups by name when i am within a certain distance say 300m? So for example i scroll the mouse wheel and i have the option to join a group, without having to be standing next to a unit from this group just when i am within 300m of a group. Thanks for this script its brilliant!

Share this post


Link to post
Share on other sites

Is there a way to edit it so only a chosen unit will get this ability?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×