Rosso777 22 Posted July 2, 2021 Using the file: ExileClient_gui_selectSpawnLocation_show, I cannot seem to figure out how to ONLY display the RANDOM option of spawn locations, rather than displaying every spawn point and allowing the player to choose. I would like RANDOM to be the only option available... OR if there is an easy way to simply bypass this file and go from Death to Respawn. Any thoughts? FILE: Spoiler private["_display", "_spawnButton", "_listBox", "_listItemIndex", "_numberOfSpawnPoints", "_randNum", "_randData", "_randomSpawnIndex"]; disableSerialization; ExileClientSpawnLocationSelectionDone = false; ExileClientSelectedSpawnLocationMarkerName = ""; 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 Share this post Link to post Share on other sites
chernaruski 338 Posted July 2, 2021 Try this overwrite, its from my old server. I'm pretty sure it works. It should do exactly what you want, since I was using the same logic of RANDOM spawn only. Spoiler private["_display","_spawnButton","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex","_spawns_arr"]; disableSerialization; diag_log "Selecting spawn location..."; ExileClientSpawnLocationSelectionDone = false; ExileClientSelectedSpawnLocationMarkerName = ""; 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 (isNil "_spawns_arr") then {_spawns_arr = []}; { if (getMarkerType _x == "ExileSpawnZone") then { _spawns_arr = _spawns_arr + [[_x]]; }; } forEach allMapMarkers; _numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers; if (_numberOfSpawnPoints > 0) then { _randNum = floor(random _numberOfSpawnPoints); _randData = _spawns_arr select _randNum; _randomSpawnIndex = _listBox lbAdd "Random"; _listBox lbSetData [_randomSpawnIndex, _randData select 0]; }; true Share this post Link to post Share on other sites
Rosso777 22 Posted July 3, 2021 5 hours ago, chernaruski said: Try this overwrite, its from my old server. I'm pretty sure it works. It should do exactly what you want, since I was using the same logic of RANDOM spawn only. This works like a charm!! Thank you, brother! Share this post Link to post Share on other sites