CameraChick

*SOLVED* Disabling Spawn Choice Screen

7 posts in this topic

Posted (edited)

I would like to completely disable the screen that lets you choose your spawn location so that every players simply spawns at one of the spawn points randomly.  I know this will involve a simple Custom Code CFG but everything I have tried allows me to pass the spawn screen (so far, so good), BUT each players spawns at the bottom corner of the map.  Any help is greatly appreciated! <3

Edited by CameraChick
Added 'SOLVED' to Title.

Share this post


Link to post
Share on other sites

that menu has a random button, find the code it processes when its highlighted and ok is clicked, add that code to the spawn in that you modified :) 

Share this post


Link to post
Share on other sites
Advertisement

Thanks, Happy. This is why you're my favorite. ;) This script is awesome... is there a way that I can hide the map while it does all this? I literally NEVER want my players to see a map.

Share this post


Link to post
Share on other sites

try this:

I havent testd it tho!

Spoiler

*
Enigma SpawnRandomizer
By Happydayz - Enigma
*/



[] spawn {

Private ["_TextControl","_mapControl","_markername","_spawnpoint","_spawnpoints","_numberOfSpawnPoints","_randNum","_display","_ButtonsArray"];
disableSerialization; 
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
createDialog "RscExileSelectSpawnLocationDialog";

waitUntil
{
	_display = findDisplay 24002;
	!isNull _display
};

_worldcentre = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
_worldcentre = [((_worldcentre select 0)*.72),((_worldcentre select 1)*1.76),(_worldcentre select 2)]; 
_mapControl = _display displayCtrl 24001; 
_mapControl ctrlSetFade 1;
_mapControl ctrlCommit 0;  


_TextControl = _display displayCtrl 24000; 
   _Textx = 0 * (0.025) + (0);    
   _Texty = -15.5 * (0.01) + (0);     
   _Textw = 40 * (0.025);     
   _Texth = 2 * (0.04);    
_TextControl ctrlSetPosition [_Textx,_Texty,_Textw,_Texth]; 
_TextControl ctrlSetText "Locating Convict Dropoff Zone";
_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0; 

  _ButtonsArray = [24003, 24002];
  {
      _ctrl = (_display displayCtrl _x);
      _ctrl ctrlSetFade 1;
      _ctrl ctrlCommit 0.25;
      ctrlEnable [_x, true];
	  ctrlDelete _ctrl
  } forEach _ButtonsArray;

uisleep 3;
_spawnpoint = "";
_spawnpoints = [];

{
	if (getMarkerType _x == "ExileSpawnZone") then
	{
		_spawnpoint = _x; 
		_spawnpoints pushback _spawnpoint;
	};
}
forEach allMapMarkers;

_TextControl ctrlSetText "Choosing Convict Dropoff Zone";
_TextControl ctrlSetFade 0;
_TextControl ctrlCommit 0.5; 

_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
if (_numberOfSpawnPoints > 0) then 
{
	_randNum = floor(random _numberOfSpawnPoints);
	ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select _randNum;

} else {

ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select 0;

};

_markername = markerText ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = getMarkerPos ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = [((_worldcentre select 0)*.991),((_worldcentre select 1)*1.006),(_worldcentre select 2)];

_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0.5; 
_TextControl ctrlSetFade 0;
_TextControl ctrlSetText format ["Your Dropoff point has been Chosen"];
_TextControl ctrlCommit 0.5; 

uisleep 3;

 [] call ExileClient_gui_selectSpawnLocation_event_onSpawnButtonClick;
 
 };

 

 

Share this post


Link to post
Share on other sites
7 hours ago, happydayz said:

try this:

I havent testd it tho!

  Reveal hidden contents


*
Enigma SpawnRandomizer
By Happydayz - Enigma
*/



[] spawn {

Private ["_TextControl","_mapControl","_markername","_spawnpoint","_spawnpoints","_numberOfSpawnPoints","_randNum","_display","_ButtonsArray"];
disableSerialization; 
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
createDialog "RscExileSelectSpawnLocationDialog";

waitUntil
{
	_display = findDisplay 24002;
	!isNull _display
};

_worldcentre = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
_worldcentre = [((_worldcentre select 0)*.72),((_worldcentre select 1)*1.76),(_worldcentre select 2)]; 
_mapControl = _display displayCtrl 24001; 
_mapControl ctrlSetFade 1;
_mapControl ctrlCommit 0;  


_TextControl = _display displayCtrl 24000; 
   _Textx = 0 * (0.025) + (0);    
   _Texty = -15.5 * (0.01) + (0);     
   _Textw = 40 * (0.025);     
   _Texth = 2 * (0.04);    
_TextControl ctrlSetPosition [_Textx,_Texty,_Textw,_Texth]; 
_TextControl ctrlSetText "Locating Convict Dropoff Zone";
_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0; 

  _ButtonsArray = [24003, 24002];
  {
      _ctrl = (_display displayCtrl _x);
      _ctrl ctrlSetFade 1;
      _ctrl ctrlCommit 0.25;
      ctrlEnable [_x, true];
	  ctrlDelete _ctrl
  } forEach _ButtonsArray;

uisleep 3;
_spawnpoint = "";
_spawnpoints = [];

{
	if (getMarkerType _x == "ExileSpawnZone") then
	{
		_spawnpoint = _x; 
		_spawnpoints pushback _spawnpoint;
	};
}
forEach allMapMarkers;

_TextControl ctrlSetText "Choosing Convict Dropoff Zone";
_TextControl ctrlSetFade 0;
_TextControl ctrlCommit 0.5; 

_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
if (_numberOfSpawnPoints > 0) then 
{
	_randNum = floor(random _numberOfSpawnPoints);
	ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select _randNum;

} else {

ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select 0;

};

_markername = markerText ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = getMarkerPos ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = [((_worldcentre select 0)*.991),((_worldcentre select 1)*1.006),(_worldcentre select 2)];

_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0.5; 
_TextControl ctrlSetFade 0;
_TextControl ctrlSetText format ["Your Dropoff point has been Chosen"];
_TextControl ctrlCommit 0.5; 

uisleep 3;

 [] call ExileClient_gui_selectSpawnLocation_event_onSpawnButtonClick;
 
 };

 

 

No-Go. :(

Share this post


Link to post
Share on other sites

Posted (edited)

SOLVED. This is what ended up working for me: (When players respawns, it spawns immediately to our one spawn point with no spawn selection screen. 

Spoiler

[] spawn {

Private ["_TextControl","_mapControl","_markername","_spawnpoint","_spawnpoints","_numberOfSpawnPoints","_randNum","_display","_ButtonsArray"];
disableSerialization; 
ExileClientSpawnLocationSelectionDone = false;
ExileClientSelectedSpawnLocationMarkerName = "";
createDialog "RscExileSelectSpawnLocationDialog";

/*

waitUntil
{
    //_display = findDisplay 24002;
    //!isNull _display
    isNull _display
};

_worldcentre = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
_worldcentre = [((_worldcentre select 0)*.72),((_worldcentre select 1)*1.76),(_worldcentre select 2)]; 
_mapControl = _display displayCtrl 24001; 
_mapControl ctrlSetFade 0;
_mapControl ctrlCommit 1;  


_TextControl = _display displayCtrl 24000; 
   _Textx = 0 * (0.025) + (0);    
   _Texty = -15.5 * (0.01) + (0);     
   _Textw = 40 * (0.025);     
   _Texth = 2 * (0.04);    
_TextControl ctrlSetPosition [_Textx,_Texty,_Textw,_Texth]; 
_TextControl ctrlSetText "Locating Convict Dropoff Zone";
_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0; 

  _ButtonsArray = [24003, 24002];
  {
      _ctrl = (_display displayCtrl _x);
      _ctrl ctrlSetFade 1;
      _ctrl ctrlCommit 0.25;
      ctrlEnable [_x, true];
      ctrlDelete _ctrl
  } forEach _ButtonsArray;

uisleep 3;
_spawnpoint = "";
_spawnpoints = [];

{
    if (getMarkerType _x == "ExileSpawnZone") then
    {
        _spawnpoint = _x; 
        _spawnpoints pushback _spawnpoint;
    };
}
forEach allMapMarkers;

_TextControl ctrlSetText "Choosing Convict Dropoff Zone";
_TextControl ctrlSetFade 0;
_TextControl ctrlCommit 0.5; 

_numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
if (_numberOfSpawnPoints > 0) then 
{
    _randNum = floor(random _numberOfSpawnPoints);
    ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select _randNum;

} else {

ExileClientSelectedSpawnLocationMarkerName = _spawnpoints select 0;

};

_markername = markerText ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = getMarkerPos ExileClientSelectedSpawnLocationMarkerName;
_worldcentre = [((_worldcentre select 0)*.991),((_worldcentre select 1)*1.006),(_worldcentre select 2)];

_TextControl ctrlSetFade 1;
_TextControl ctrlCommit 0.5; 
_TextControl ctrlSetFade 0;
_TextControl ctrlSetText format ["Your Dropoff point has been Chosen"];
_TextControl ctrlCommit 0.5; 

*/

//uisleep 0.1;

 [] call ExileClient_gui_selectSpawnLocation_event_onSpawnButtonClick;
 
 };

 

Edited by CameraChick
Made spoiler.
1 person likes this

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.