Jump to content

[Release] Spawn Selection Dialog Menu - v1.0


sparrow8332

Recommended Posts

This works but you can't choose your sex before the spawn points, so once you TP to the spawn it asks you to choose your sex and puts you back in the spawn room.

 

Lol thats a fail.

 

I still think that the gender selection is done very badly, this along with the kick to lobby on kill is just annoying but thats just my opinion.

 

thanks for the testing Richie, Ill keep trying on my end and let you know if I maybe find something

Link to comment
Share on other sites

For Chernarus.

 

Spaz_spawn.sqf :

Chernarus_Spawn_North         = [12281.634,10587.725,0.1];
Chernarus_Spawn_South         = [2720.9233,10031.975,0.1];
Chernarus_Spawn_East         = [12060.469,3602.0864,0.1];
Chernarus_Spawn_West         = [1923.0521,2184.582,0.1];
Chernarus_Spawn_Centeral     = [7146.5957,7542.5747,0.1];

Then edit Spaz_Spawn.hpp, change lines 235-285

class spaz_sb1: RscButton
        {
            idc = 1600;
            text = "North East"; //--- ToDo: Localize;
            x = 0.618565 * safezoneW + safezoneX;
            y = 0.323978 * safezoneH + safezoneY;
            w = 0.0618602 * safezoneW;
            h = 0.0440055 * safezoneH;
            action = "closedialog 0; _nil=[] spawn {call SPAZ_SPAWN_N;};";
            tooltip = "Spawn Area NORTH East";
        };
        class spaz_sb2: RscButton
        {
            idc = 1601;
            text = "North West"; //--- ToDo: Localize;
            x = 0.618565 * safezoneW + safezoneX;
            y = 0.389986 * safezoneH + safezoneY;
            w = 0.0618602 * safezoneW;
            h = 0.0440055 * safezoneH;
            action = "closedialog 0; _nil=[] spawn {call SPAZ_SPAWN_S;};";
        };
        class spaz_sb3: RscButton
        {
            idc = 1602;
            text = "South East"; //--- ToDo: Localize;
            x = 0.618565 * safezoneW + safezoneX;
            y = 0.455995 * safezoneH + safezoneY;
            w = 0.0618602 * safezoneW;
            h = 0.0440055 * safezoneH;
            action = "closedialog 0; _nil=[] spawn {call SPAZ_SPAWN_E;};";
        };
        class spaz_sb4: RscButton
        {
            idc = 1603;
            text = "South West"; //--- ToDo: Localize;
            x = 0.618565 * safezoneW + safezoneX;
            y = 0.522003 * safezoneH + safezoneY;
            w = 0.0618602 * safezoneW;
            h = 0.0440055 * safezoneH;
            action = "closedialog 0; _nil=[] spawn {call SPAZ_SPAWN_W;};";
        };
        class spaz_sb5: RscButton
        {
            idc = 1604;
            text = "Central"; //--- ToDo: Localize;
            x = 0.618565 * safezoneW + safezoneX;
            y = 0.588011 * safezoneH + safezoneY;
            w = 0.0618602 * safezoneW;
            h = 0.0440055 * safezoneH;
            action = "closedialog 0; _nil=[] spawn {call SPAZ_SPAWN_C;};";
        };
Link to comment
Share on other sites

Need BE filter for this line in scripts.txt:

7 createDialog !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if (!dialog) then {createDialog 'Skaronator_AdminMenu'};" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !"createdialog 'AdminMenu';[] call fnc_addMenuMapHandler;" !"RscDisplayLocWeaponInfo" !"RscFunctionsViewer"

and this one:

7 displayAddEventHandler !"[_display] call _fnc_animate;" !"tVersion select 4) == \"Development\") then" !"_display displayaddeventhandler\n[\n\"mousemoving\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"true\"];" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call EPOCH_KeyDown\"];" !"_display displayaddeventhandler [\"unload\",\"uinamespace setvariable ['BIS_fnc_guiMess" !="findDisplay -1337 displayAddEventHandler ['Unload'"

and this one:
 

7 displayRemoveEventHandler !"BIS_fnc_guiMessage_status"
Link to comment
Share on other sites

@R4ziel http://pastebin.com/xMAaKYnT

It's between markers and intro

 

class Sensors
        {
                items=1;
                class Item0
                {
position[] = {1024.85, 5.8588, 2023.52}; //respawn_west Location
a = 10;
b = 10;
activationBy = "ANY";
repeating = 1;
interruptable = 1;
age = "UNKNOWN";
name = "SPAWNPOINT";
expCond = "(player distance SPAWNPOINT) < 10;";
expActiv = "hint ""You are in the clone room""; inSpawnPoint = true;};";
expDesactiv = "inSpawnPoint = false;";
class Effects{};
};
        };
};
Link to comment
Share on other sites

 

@R4ziel http://pastebin.com/xMAaKYnT

It's between markers and intro

class Sensors
        {
                items=1;
                class Item0
                {
position[] = {1024.85, 5.8588, 2023.52}; //respawn_west Location
a = 10;
b = 10;
activationBy = "ANY";
repeating = 1;
interruptable = 1;
age = "UNKNOWN";
name = "SPAWNPOINT";
expCond = "(player distance SPAWNPOINT) < 10;";
expActiv = "hint ""You are in the clone room""; inSpawnPoint = true;};";
expDesactiv = "inSpawnPoint = false;";
class Effects{};
};
        };
};

 

Got it thanks, didnt copy the last }; at the end sigh XD

Link to comment
Share on other sites

Random Spawn you could use this and change the cords to suite map :

if (!isDedicated) then {
			if (isNil "inSpawnPoint") then {
			inSpawnPoint = false;
			};
			 
			while {true} do {
				waitUntil { inSpawnPoint };
				titleText [format["Entering Random Spawn"],"PLAIN DOWN"]; titleFadeOut 4;
				 
				waitUntil { player == vehicle player };
				 
				thePlayer = vehicle player;

				_spawnpointsarray = [
				[12158.7, 12475.1, 0.1],
				[13507.5, 11589.3, 0.1],
				[14878.4, 11473.1, 0.1],
				[16329.8, 10142.6, 0.1],
				[17255.4, 9351.79, 0.1],
				[17807.7, 7886.61, 0.1],
				[18037, 6937.81, 0.1],
				[16751.1, 5731.63, 0.1],
				[16907.3, 4053.85, 0.1],
				[16152.9, 3038.43, 0.1],
				[16512.5, 1743.51, 0.1],
				[15625.6, 217.775, 0.1],
				[13301.6, 1976.27, 0.1],
				[12536.5, 942.813, 0.1],
				[11398.1, 2489.05, 0.1],
				[9834.65, 2008.62, 0.1],
				[7792.54, 3339.11, 0.1],
				[6625.45, 4299.48, 0.1],
				[4465.34, 4549.53, 0.1],
				[2339.48, 6703.84, 0.1],
				[1327.44, 8722.31, 0.1],
				[1706.66, 10981.1, 0.1],
				[2770.03, 13533, 0.1],
				[2505.27, 16581.3, 0.1],
				[2914.5, 17448.1, 0.1],
				[3478.99, 18979.3, 0.1],
				[3488.37, 19894.7, 0.1],
				[4676.7, 18045.9, 0.1],
				[7154.52, 16726.5, 0.1],
				[8334.22, 15284.7, 0.1],
				[9834.89, 14185.3, 0.1],
				[10916.6, 14206.4, 0.1],
				[12773.2, 12721.7, 0.1],
				[12188.3, 8099.59, 0.1],
				[7920.82, 9820.34, 0.1]
				];

				systemChat "";
				_selectspawnpoint = _spawnpointsarray select floor random count _spawnpointsarray;
				sleep 1;
				systemChat "";
				sleep 1;
				thePlayer setPos _selectspawnpoint;
				waitUntil { !inSpawnPoint };
				cutText ["","BLACK IN"];
				titleText [format["Good Luck"],"PLAIN DOWN"]; titleFadeOut 4;
				(findDisplay 8332) displayRemoveEventHandler ["KeyDown", noesckey];		 
			};
		};	
Link to comment
Share on other sites

Coastal spawns for random on Chernarus :

_spawnpointsarray = [
[1745,2107,0.1],
[2737,1980,0.1],
[3663,2130,0.1],
[4109,2317,0.1],
[4813,2086,0.1],
[5825,2023,0.1],
[6357,2082,0.1],
[7198,2533,0.1],
[7226,2187,0.1],
[8045,2835,0.1],
[8577,2320,0.1],
[9286,1902,0.1],
[9840,1786,0.1],
[10466,1886,0.1],
[10243,1576,0.1],
[10857,2275,0.1],
[11939,3402,0.1],
[11105,3009,0.1],
[13509,6166,0.1],
[13081,7804,0.1],
[12940,9326,0.1],
[13170,10292,0.1]
];
Link to comment
Share on other sites

Added in a new Button for my 6th spawn point.

Random just puts you right back at the clone room -REMOVED button.

Customized JPG for altis 2sec job.

Added in New spawn point referening SouthWest spawn for new button above.

Fix this in your description:

expActiv = "hint ""You are in the clone room""; inSpawnPoint = true;};";
The }; can go away its erring out in the RPT

Otherwise fantastic job on this.

This should help me understand them GUI's a bit more too THanks

Link to comment
Share on other sites

I'm getting a few but not all players saying they have the GUI appear even when not dead or in the spawn room :unsure:

So they spawn in, pick a location and start playing, a few hours later the log back on and have the option to pick a spawn, even though they're not dead, it will go away if they ignore it but still odd, only a few players are reporting it.

Link to comment
Share on other sites

I'm getting a few but not all players saying they have the GUI appear even when not dead or in the spawn room :unsure:

So they spawn in, pick a location and start playing, a few hours later the log back on and have the option to pick a spawn, even though they're not dead, it will go away if they ignore it but still odd, only a few players are reporting it.

 

 

check your sensor, Ive been running it now for over a week and not an issue :-s 

 

sensor 

		class Item0
		{
			position[] = {8886.766,102.1,9097.741};  // respawn west
			a = 10;
			b = 10;
			activationBy = "ANY";
			repeating = 1;
			interruptable = 1;
			age = "UNKNOWN";
			name = "SPAWNPOINT";
			expCond = "(player distance SPAWNPOINT) < 10;";
			expActiv = "hint ""Receiving clone...""; inSpawnPoint = true;";
			expDesactiv = "inSpawnPoint = false;";
			class Effects{};
		};

at the bottom off onPlayerRespawn.sqf

if (isNil "inSpawnPoint") then 
{
	inSpawnPoint = false;
};
uiSleep 1;
waitUntil { inSpawnPoint };
createDialog "spaz_spawn";
noesckey = (findDisplay 8332) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 1) then { true }"]; 
Link to comment
Share on other sites

Where to find this "onPlayerRespawn.sqf" i have no file named that ? i have normal epoch mod not edited 

 

just make one - paste whats in the instructions for onplayerrespawn.sqf into notepad and saveas onPlayerRespawn.sqf  place that into your mission root directory :-)

 

Updated Github with one for people to use if they dont have onPlayerRespawn.sqf

Link to comment
Share on other sites

Just an idea for loadout selection before spawn dialog 

 

1C9c5kK.jpg

 

i want to add this =)

 

For random spawn i edit your code to 

SPAZ_SPAWN_R = {
 private ["ran_spawn"];

 ran_spawn = [
[24859.6,23450.9,0.1],
[23649.2,23271.7,0.1],
[23716.1,23099.8,0.1],
[23774.9,23228.7,0.1],
[23956.3,23257.7,0.1],
[23966.5,23086.9,0.1],
[24026.3,23206.6,0.1],
[24120.7,23125.3,0.1],
[24202.3,23231.1,0.1],
[24255.7,23104.4,0.1],
[24344.4,23189.6,0.1],
[24392,23102.5,0.1],
[24402.3,23234.7,0.1],
[24502,23155.7,0.1],
[24539.5,23258,0.1],
[24542.5,23376.3,0.1],
[24654.1,23238.1,0.1],
[24408.6,23306.2,0.1],
[24712.9,23312.4,0.1],
[24668.4,23452.4,0.1],
[24745.5,23370.1,0.1],
[24886.4,23391.6,0.1],
[24798.1,23536.8,0.1],
[24268.6,23355.1,0.1],
[24059.9,23332.2,0.1],
[23872.3,23325.1,0.1],
[23588.9,23143,0.1],
[24633.1,23350.9,0.1]

] call BIS_fnc_selectRandom; 
  player setpos ran_spawn;	
};

Ad dont know why map picture wont show up

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...