Jump to content

Recommended Posts

Hello everyone,

 

lately, I have been looking for ways to improve quality of life as a long time Zeus mission maker.

Is there a way to switch SIDE on All players currently in session with the press of a button. One button for each side or, better yet, make it toggle between two sides such as West and Civilian on the press of a button?

This would be very convenient for me, as I would otherwise have to be quick on my feet at times, constantly bringing up modules back and forth in order to change it and I am quite busy as is during the sessions.

 

 

Any pointer or tip is very appreciated.

Share this post


Link to post
Share on other sites

Here is a little Script that i wrote in 5 min. Dont know if it works in multiplayer. It should.
Also if you want to change key binds you can do that as well.
Steps to make it work.
1.In Eden Editor place down Game Master Module with a eye icon.
2.Double click Module and in Init of the Module Place this Code:

3.If you dont like current keybinds you can change them just by changing numbers in if(_key == number) here is a list of all keys: https://community.bistudio.com/wiki/DIK_KeyCodes
4.Current setup is NumPad numbers from 1 to 4 they will change players sides.
5.When you are happy with keybinds just delete hint lines. If you are anoyed with hints.
6.Also becouse of this forum When you copy the script from here make sure there is no hidden characters so it wouldnt throw error in eden.

this addEventHandler["CuratorObjectRegistered",{
	0 spawn {
		waitUntil {!(isNull (findDisplay 312))};
                     
		(findDisplay 312) displayAddEventHandler["keyDown",{
                     
			params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];

			if (_key == 79) then 
			{
				hint format ["Player Pressed numpad 1 \nKeyCode: %1 \nPlayer Side Set to BlueFor.",_key];
				private _west = createGroup blufor;
				private _players = allPlayers - entities "HeadlessClient_F";
				{[_x] joinSilent _west;} foreach _players;
			};

			if (_key == 80) then 
			{
				hint format ["Player Pressed numpad 2 \nKeyCode: %1\nPlayer Side Set to Opfor.",_key];
				private _opfor = createGroup opfor;
				private _players = allPlayers - entities "HeadlessClient_F";
				{[_x] joinSilent _opfor;} foreach _players;
			};

			if (_key == 81) then 
			{
				hint format ["Player Pressed numpad 3 \nKeyCode: %1\nPlayer Side Set to Independet.",_key];
				private _independent = createGroup independent;
				private _players = allPlayers - entities "HeadlessClient_F";
				{[_x] joinSilent _independent;} foreach _players;
			};

			if (_key == 75) then 
			{
				hint format ["Player Pressed numpad 4 \nKeyCode: %1\nPlayer Side Set to Civilian.",_key];
				private _civilian = createGroup civilian;
				private _players = allPlayers - entities "HeadlessClient_F";
				{[_x] joinSilent _civilian;} foreach _players;
			};
		}];
	};
}];

 

  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

Did some testing and it works like a charm. Thanks so much!!  

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

×