StokesMagee

[FIX] Spawn in ground

31 posts in this topic

Well, after so many people are having the spawn in ground bug i decided to take a quick look at the cause, and I've figured it out.

TLDR: Arma

Long reason:

Spoiler

Basically what's happening is the main display (46) is for some reason not loading fast enough and the display is not being created, another thing to note is that Exile are also suspending in an FSM O.o

 

I DON'T CARE ABOUT THE REASON JUST GIVE ME THE FIX.... ok ok... here is the fix:

 

Make a file in your mission file called "ExileClient_gui_selectSpawnLocation_show.sqf" and add inside of it:

Spoiler

/**
 * ExileClient_gui_selectSpawnLocation_show
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";

[] spawn
{
	disableSerialization;
	private["_display", "_spawnButton", "_listBox", "_listItemIndex", "_numberOfSpawnPoints", "_randNum", "_randData", "_randomSpawnIndex"];

	uiSleep 0.1;
	waitUntil {!isNull (findDisplay 46)};

	createDialog "RscExileSelectSpawnLocationDialog";
	waitUntil
	{
		_display = findDisplay 24002;
		!isNull _display
	};
	
	_spawnButton = _display displayCtrl 24003;
	_spawnButton ctrlEnable false;
	_display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
	_listBox = _display displayCtrl 24002;
	lbClear _listBox;
	{
		if (getMarkerType _x == "ExileSpawnZone") then
		{
			_listItemIndex = _listBox lbAdd (markerText _x);
			_listBox lbSetData [_listItemIndex, _x];
		};
	}
	forEach allMapMarkers;
	_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
	if (_numberOfSpawnPoints > 0) then 
	{
		_randNum = floor(random _numberOfSpawnPoints);
		_randData = lbData [24002,_randNum];
		_randomSpawnIndex = _listBox lbAdd "Random";
		_listBox lbSetData [_randomSpawnIndex, _randData];
	};
	true
};

true

 

 

then go to the config.cpp (or wherever your CfgExileCustomCode is) and find CfgExileCustomCode and add:

ExileClient_gui_selectSpawnLocation_show = "ExileClient_gui_selectSpawnLocation_show.sqf";

 

NOTE: if you're using XS Spawn use this instead:

Spoiler

/**
 * ExileClient_gui_selectSpawnLocation_show
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
[] spawn
{
	private["_display","_spawnButton","_spawnButton2","_tipText","_tipTextList","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex"];
	disableSerialization;

	uiSleep 0.1;
	waitUntil{!isNull (findDisplay 46)};

	createDialog "xstremeGroundorHaloDialog";
	_display = uiNamespace getVariable ["xstremeGroundorHaloDialog",displayNull];
	_display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
	_spawnButton = _display displayCtrl 1600;
	_spawnButton2 = _display displayCtrl 1601;
	_spawnButton ctrlEnable false;
	_spawnButton2 ctrlEnable false;
	_tipText = _display displayCtrl 1204;
	_listBox = _display displayCtrl 1500;
	lbClear _listBox;
	{
		if (getMarkerType _x == "ExileSpawnZone") then
		{
			_listItemIndex = _listBox lbAdd (markerText _x);
			_listBox lbSetData [_listItemIndex, _x];
		};
	}
	forEach allMapMarkers;
	_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
	if (_numberOfSpawnPoints > 0) then 
	{
		_randNum = floor(random _numberOfSpawnPoints);
		_randData = lbData [1500,_randNum];
		_randomSpawnIndex = _listBox lbAdd "Random";
		_listBox lbSetData [_randomSpawnIndex, _randData];
	};

	_tipTextList = selectRandom 
	[
		"Connect to the xstreme gaming discord at discord.xstremegaming.com",
		"Server news, comp claims and more join the communnity www.xstremegaming.com",
		"This is a game of loss, its a wild world out there, good luck!",
		"Enjoy the server... Please consider donating to help keep us alive",
		"Any vehicle left inside the black safezone circle will be deleted at restart",
		"Press 'M' key for Map in game to view Server Rules and Building Limits",
		"Do not leave vehicles on exile base parts, at restart they will likely explode",
		"Press the 'U' key when your loaded in to show your FPS on the Status bar"
	];
	_tipText ctrlSetStructuredText parseText format["<t size ='1.8 / (getResolution select 5)' valign='middle' align='right'>[ %1 ]</t>",_tipTextList];

	true
};

true

 

WITH eXpoch base respawn:

Spoiler

/**
 * ExileClient_gui_selectSpawnLocation_show
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

//private["_display","_spawnButton","_spawnButton2","_tipText","_tipTextList","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex"];
//disableSerialization;
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
eXpochClientPlayerBases = [];
[] spawn
{
    uiSleep 0.1;
    waitUntil {!isNull (findDisplay 46)};
    disableSerialization;
    private["_display","_spawnButton","_spawnButton2","_tipText","_tipTextList","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex"];
	// Normal Code..
	createDialog "xstremeGroundorHaloDialog";
	_display = uiNamespace getVariable ["xstremeGroundorHaloDialog",displayNull];
	_display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
	_spawnButton = _display displayCtrl 1600;
	_spawnButton2 = _display displayCtrl 1601;
	_spawnButton ctrlEnable false;
	_spawnButton2 ctrlEnable false;
	_tipText = _display displayCtrl 1204;
	_listBox = _display displayCtrl 1500;
	lbClear _listBox;
	{
		if (getMarkerType _x == "ExileSpawnZone") then
		{
			_listItemIndex = _listBox lbAdd (markerText _x);
			_listBox lbSetData [_listItemIndex, _x];
		};
	}
	forEach allMapMarkers;

	//eXpoch base spawn
	if (eXpochClientPlayerLastBaseSpawn < (diag_tickTime - eXpochBaseRespawnTimeLimit)) then
	{
		_mapCenter = [worldSize/2,worldSize/2,0];
		_allTerritoryFlags = (nearestObjects [_mapCenter, ["Exile_Construction_Flag_Static"], ceil(worldSize/1.75 + 3000)]);
		{
			_playerUID = getPlayerUID player;
			_buildRights = _x getVariable [eXpochBaseSpawnAllowedType, []];
			if (_playerUID in _buildRights) then
			{
				_territoryLevelConfig =_x getVariable ["ExileTerritoryLevel", 0];
				if (_territoryLevelConfig >= eXpochBaseSpawnLevelRequired) then
				{
					_baseName = _x getVariable ["ExileTerritoryName", ""];
					eXpochClientPlayerBases pushBack _baseName;
					createMarker [_baseName,getPosATL _x];
					_listItemIndex = _listBox lbAdd _baseName;
					_listBox lbSetData [_listItemIndex, _baseName];
					_listBox lbSetColor [_listItemIndex, [0.72,0.18,0.2,1]];
				};
			};
		}
		forEach _allTerritoryFlags;
	};

	_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
	if (_numberOfSpawnPoints > 0) then
	{
		_randNum = floor(random _numberOfSpawnPoints);
		_randData = lbData [1500,_randNum];
		_randomSpawnIndex = _listBox lbAdd "Random";
		_listBox lbSetData [_randomSpawnIndex, _randData];
		_listBox lbSetColor [_randomSpawnIndex, [0,0.78,0.06,1]];
	};

	_tipTextList = selectRandom
	[
		"Find us at FriendlyPlayerShooting.com",
		"If you enjoy the server, please consider donating to keep it alive!",
		"This is a game of loss, its a wild world out there, good luck!",
		"Check out our Discord at discord.me/friendlyplayershooting"
	];

	_tipText ctrlSetStructuredText parseText format["<t size ='1.8 / (getResolution select 5)' valign='middle' align='right'>%1</t>",_tipTextList];
	true
};

true

 

 

Edited by StokesMagee
  • Like 5

Share this post


Link to post
Share on other sites
35 minutes ago, StokesMagee said:

Well, after so many people are having the spawn in ground bug i decided to take a quick look at the cause, and I've figured it out.

TLDR: Arma

Long reason:

  Reveal hidden contents

Basically what's happening is the main display (46) is for some reason not loading fast enough and the display is not being created, another thing to note is that Exile are also suspending in an FSM O.o

 

I DON'T CARE ABOUT THE REASON JUST GIVE ME THE FIX.... ok ok... here is the fix:

 

Make a file in your mission file called "ExileClient_gui_selectSpawnLocation_show.sqf" and add inside of it:

  Reveal hidden contents


/**
 * ExileClient_gui_selectSpawnLocation_show
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";

[] spawn
{
	disableSerialization;
	private["_display", "_spawnButton", "_listBox", "_listItemIndex", "_numberOfSpawnPoints", "_randNum", "_randData", "_randomSpawnIndex"];

	uiSleep 0.1;
	waitUntil {!isNull (findDisplay 46)};

	createDialog "RscExileSelectSpawnLocationDialog";
	waitUntil
	{
		_display = findDisplay 24002;
		!isNull _display
	};
	
	_spawnButton = _display displayCtrl 24003;
	_spawnButton ctrlEnable false;
	_display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
	_listBox = _display displayCtrl 24002;
	lbClear _listBox;
	{
		if (getMarkerType _x == "ExileSpawnZone") then
		{
			_listItemIndex = _listBox lbAdd (markerText _x);
			_listBox lbSetData [_listItemIndex, _x];
		};
	}
	forEach allMapMarkers;
	_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
	if (_numberOfSpawnPoints > 0) then 
	{
		_randNum = floor(random _numberOfSpawnPoints);
		_randData = lbData [24002,_randNum];
		_randomSpawnIndex = _listBox lbAdd "Random";
		_listBox lbSetData [_randomSpawnIndex, _randData];
	};
	true
};

true

 

 

then go to the config.cpp (or wherever your CfgExileCustomCode is) and find CfgExileCustomCode and add:


ExileClient_gui_selectSpawnLocation_show = "ExileClient_gui_selectSpawnLocation_show.sqf";

 

NOTE: if you're using XS Spawn use this instead:

  Reveal hidden contents


/**
 * ExileClient_gui_selectSpawnLocation_show
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
[] spawn
{
	private["_display","_spawnButton","_spawnButton2","_tipText","_tipTextList","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex"];
	disableSerialization;

	uiSleep 0.1;
	waitUntil{!isNull (findDisplay 46)};

	createDialog "xstremeGroundorHaloDialog";
	_display = uiNamespace getVariable ["xstremeGroundorHaloDialog",displayNull];
	_display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
	_spawnButton = _display displayCtrl 1600;
	_spawnButton2 = _display displayCtrl 1601;
	_spawnButton ctrlEnable false;
	_spawnButton2 ctrlEnable false;
	_tipText = _display displayCtrl 1204;
	_listBox = _display displayCtrl 1500;
	lbClear _listBox;
	{
		if (getMarkerType _x == "ExileSpawnZone") then
		{
			_listItemIndex = _listBox lbAdd (markerText _x);
			_listBox lbSetData [_listItemIndex, _x];
		};
	}
	forEach allMapMarkers;
	_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
	if (_numberOfSpawnPoints > 0) then 
	{
		_randNum = floor(random _numberOfSpawnPoints);
		_randData = lbData [1500,_randNum];
		_randomSpawnIndex = _listBox lbAdd "Random";
		_listBox lbSetData [_randomSpawnIndex, _randData];
	};

	_tipTextList = selectRandom 
	[
		"Connect to the xstreme gaming discord at discord.xstremegaming.com",
		"Server news, comp claims and more join the communnity www.xstremegaming.com",
		"This is a game of loss, its a wild world out there, good luck!",
		"Enjoy the server... Please consider donating to help keep us alive",
		"Any vehicle left inside the black safezone circle will be deleted at restart",
		"Press 'M' key for Map in game to view Server Rules and Building Limits",
		"Do not leave vehicles on exile base parts, at restart they will likely explode",
		"Press the 'U' key when your loaded in to show your FPS on the Status bar"
	];
	_tipText ctrlSetStructuredText parseText format["<t size ='1.8 / (getResolution select 5)' valign='middle' align='right'>[ %1 ]</t>",_tipTextList];

	true
};

true

 

 

Thanks Stokes.. Ill have to look over the exact add on to fix, as my XS spawn has base spawn added and may not be exactly this..  But good job, did have a player complaining of this.. Also had a few reports of players dying during halo for no reason, just dead in air.  Any clue?

Share this post


Link to post
Share on other sites
Advertisement
14 minutes ago, geekm0nkey said:

Thanks Stokes.. Ill have to look over the exact add on to fix, as my XS spawn has base spawn added and may not be exactly this..  But good job, did have a player complaining of this.. Also had a few reports of players dying during halo for no reason, just dead in air.  Any clue?

Did you not read the bottom of the OP???

Share this post


Link to post
Share on other sites
10 minutes ago, StokesMagee said:

Did you not read the bottom of the OP???

Yes dear.. Didn't you read my post.. lol.. I've added base spawning to the original XS spawn..

Share this post


Link to post
Share on other sites
11 minutes ago, geekm0nkey said:

Yes dear.. Didn't you read my post.. lol.. I've added base spawning to the original XS spawn..

I don't use XS spawn so no idea what it has / doesn't have.

 

nor will i EVER use

Edited by StokesMagee

Share this post


Link to post
Share on other sites
11 minutes ago, StokesMagee said:

I don't use XS spawn so no idea what it has / doesn't have.

Yeah, yeah, cause you have that cool ass clone you made.. that you wont sell.. Jerk.. ;) just kidding.

Wait.... You DONT know everything.. (shocked face)....

Edited by geekm0nkey

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.