Jump to content
  • 0

Spawn Script server_playerSetup


SniperNoSniping

Question

Hey guys, just had a quick question. I found this really neat HALO jump script for my Panthera server however I was hoping someone from the Epoch Development or someone with a lot of knowledge of the Epoch Server files. I need to make it so the player spawn is through my SQF script and not random through the mission file. Was hoping you would be able to comment on how I could disable the player spawn and enable my personal player spawn within the Mission File itself. I have all the necessary files to create my own personal spawn points just need to know how I can disable the current random spawn appropriately without breaking the server and embedding a code to spawn at certain cities.

 

Section I believe is the player spawn within server_playerSetup:

 

if (_randomSpot) then {
private["_counter","_position","_isNear","_isZero","_mkr"];
if (!isDedicated) then {
endLoadingScreen;
};
 
//Spawn modify via mission init.sqf
if(isnil "spawnArea") then {
spawnArea = 1500;
};
if(isnil "spawnShoremode") then {
spawnShoremode = 1;
};
 
// 
_spawnMC = actualSpawnMarkerCount;
 
//spawn into random
_findSpot = true;
_mkr = "";
while {_findSpot} do {
_counter = 0;
while {_counter < 20 and _findSpot} do {
// switched to floor
_mkr = "spawn" + str(floor(random _spawnMC));
_position = ([(getMarkerPos _mkr),0,spawnArea,10,0,2000,spawnShoremode] call BIS_fnc_findSafePos);
_isNear = count (_position nearEntities ["Man",100]) == 0;
_isZero = ((_position select 0) == 0) and ((_position select 1) == 0);
//Island Check //TeeChange
_pos = _position;
_isIsland = false; //Can be set to true during the Check
for [{_w=0},{_w<=150},{_w=_w+2}] do {
_pos = [(_pos select 0),((_pos select 1) + _w),(_pos select 2)];
if(surfaceisWater _pos) exitWith {
_isIsland = true;
};
};
 
if ((_isNear and !_isZero) || _isIsland) then {_findSpot = false};
_counter = _counter + 1;
};
};
_isZero = ((_position select 0) == 0) and ((_position select 1) == 0);
_position = [_position select 0,_position select 1,0];
if (!_isZero) then {
//_playerObj setPosATL _position;
_worldspace = [0,_position];
};
};
 
End Section
 
I just don't want to disable the wrong thing and never get it back.
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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
  • Advertisement
  • Discord

×
×
  • Create New...