Jump to content

Graphical Spawn Select for Taviana


Darce

Recommended Posts

Ok I got it working by changing

 

spawnShoremode = 1;

 

to this

 

spawnShoremode = 0;

 

In init.sqf

can I see you init.sqf

 

 

my init settings
 
spawnShoremode = 0; // Default = 1 (on shore)
spawnArea = 1500; // Default = 1500
dayz_paraSpawn = false;
 
 
//Start Dynamic Weather
execVM "DynamicWeatherEffects.sqf";
[] execVM "addons\R3F_ARTY_AND_LOG\init.sqf";
execVM "service_point\service_point.sqf";
[] execVM "custom\mv22fold.sqf";
#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"
 
waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; 
if (dayzPlayerLogin2 select 2) then { 
[] execVM "addons\DRNSpawn.sqf"; 
 
};
 
[] execVM "faction.sqf";
[] execVM "custom\seat_action.sqf";
_nil = [] execVM "safezone\init.sqf";
Link to comment
Share on other sites

I would like to update this for my lingor map. But just wondering about the coords in DRNdialogs.hpp.

		class btnSabina: RscButton
		{
			idc = 1601;
			text = "Sabina";
			x = 0.576969 * safezoneW + safezoneX;
			y = 0.526875 * safezoneH + safezoneY;
			w = 0.0325326 * safezoneW;
			h = 0.0145 * safezoneH;
			action = "closeDialog 0;drnspawn = 1;";
		};

I take it these are the coords for the image buttons? So what would I have to use to get them for my map? I know how to make a new image, just wondering about the coords in DRNdialogs

Link to comment
Share on other sites

  • 3 weeks later...

how would one go about getting the coords for modifying spawn locations? looking to modify this for Chernarus but there is a lot more numbers in there. the coords dont look to be the same as the ones saved to database? If so, i could just place special object at location and extract my locations thatway.

 

Never mind to original post, they are exactly as they are in database. Another question tho, this bit of code, are these the possible spawn locations when Branibor is selected? (i play on chernarus so just trying to understand these for when i modify for chernarus)

 

//Branibor
    [[8225.28,3073.61,10.4816], [8917.26,4271.81,80.3664], [8228.37,5491.64,100.734], [7069.92,4880.18,34.7772], [5719.95,5951.77,37.2921]],

 

Awesome script, probably going to go mess with it before awaiting response, see if i can answer my own questions  =p

 

The only problem i am having atm is finding a map file for chernarus

Link to comment
Share on other sites

I use ArmA2  3d editor, put the triggers in the spawn points and in mission.sqf i have the coord..

change the name of the spawn and coord in DRNSpawn.sqf for the first script or execSpawn.sqf the second script

The file DRNdialogs.hpp view your map, and spawn points ,that need to be in sequence as the file xxxxSpawn.sqf

You need to create the map in. paa with TextView2 converting a file. png for example

changes position and size of the buttons in the file DRNDialogs.hpp acting on X,Y,W or position only  X,Y in second script .. done

however if you have problems I can convert ... :)

Link to comment
Share on other sites

how would one go about getting the coords for modifying spawn locations? looking to modify this for Chernarus but there is a lot more numbers in there. the coords dont look to be the same as the ones saved to database? If so, i could just place special object at location and extract my locations thatway.

 

Never mind to original post, they are exactly as they are in database. Another question tho, this bit of code, are these the possible spawn locations when Branibor is selected? (i play on chernarus so just trying to understand these for when i modify for chernarus)

 

//Branibor

    [[8225.28,3073.61,10.4816], [8917.26,4271.81,80.3664], [8228.37,5491.64,100.734], [7069.92,4880.18,34.7772], [5719.95,5951.77,37.2921]],

 

Awesome script, probably going to go mess with it before awaiting response, see if i can answer my own questions  =p

 

The only problem i am having atm is finding a map file for chernarus

 

I have modified the script for Cherno abit...

Change DRNSpawn.sqf to:

private ["_position","_findSpot","_isNear","_isZero","_counter","_locArray","_ok","_seldLoc"];
_locArray = [[5058,12562,0], //Petrovka
		[8625,11968,0], //Gvozdno
		[3689,8847,0], //Vybor
		[9588,8908,0], //Gorka
		[12108,8974,0], //Berezino
		[6560,6150,0], //Vyshnoye
		[2650,5361,0], //Zelenogorsk
		[13467,6472,0], //Solnichny
		[3727,2334,0], //Komarovo
		[7235,2244,0], //Cherno
		[10687,2271,0], //Elektro
		[12297,3486,0], //Kamyshovo
		[13391,4124,0]]; //Krutov
		
cutText ["","BLACK OUT"];
_ok = createDialog "DRN_DIALOG";
drnspawn = -1;
waitUntil {drnspawn != -1};
if (drnspawn == 13) then {drnspawn = floor (random 13)};
_seldLoc = _locArray select drnspawn;
_findSpot = true;
_counter = 0;
while {_findSpot and _counter < 20} do {
	_position = ([(_seldLoc),0,200,10,0,20,0] call BIS_fnc_findSafePos);
	_isNear = count (_position nearEntities ["Man",100]) == 0;
	_isZero = ((_position select 0) == 0) and ((_position select 1) == 0);
	_counter = _counter + 1;
	if (_isNear and !_isZero) then {_findSpot = false};
};

_position = [_position select 0,_position select 1,0];
//diag_log("DEBUG: spawning player at" + str(_position));
player setPosATL _position;
cutText ["","BLACK IN"];

Now all you need to do is update map and buttons in DRNdialogs.hpp

Link to comment
Share on other sites

By update buttons, you mean their locations correct

 

class btnByelov: RscButton
        {
            idc = 1600;
            text = "Byelov";
            x = 0.590252 * safezoneW + safezoneX;
            y = 0.59375 * safezoneH + safezoneY;
            w = 0.0340954 * safezoneW;
            h = 0.0145 * safezoneH;
            action = "closeDialog 0;drnspawn = 0;";
        };

 

and still working on figuring out the map part. what a pain but thanks for all the upport

Link to comment
Share on other sites

from array of adg  
 
class btnChe: RscButton
{
    idc = 1609;
    text = "Cherno";
    x = 0.447265 * safezoneW + safezoneX;
    y = 0.726875 * safezoneH + safezoneY;
    w = 0.0431419 * safezoneW;
    h = 0.0145 * safezoneH;
    action = "closeDialog 0;drnspawn = 9;";
};
class btnELE: RscButton
{
    idc = 1610;
    text = "Elektrozavodsk";
    x = 0.527265 * safezoneW + safezoneX;
    y = 0.726875 * safezoneH + safezoneY;
    w = 0.0551419 * safezoneW;
    h = 0.0145 * safezoneH;
    action = "closeDialog 0;drnspawn = 10;";
};
 
 
Petrovka  idc=1600
 
Krutov     idc=1612
Link to comment
Share on other sites

jrcx06.jpg

 

\\Edit: I recommend you use this script: http://opendayz.net/threads/release-ess-enhanced-spawn-selection.19998/

 

Heres my version of the spawn selector for Chernarus: https://dl.dropboxusercontent.com/u/14937351/spawnselect.zip

 

Install instructions:

 

-) Unpack the files in the archive to your mission folder.

 

1) In the end of !isDedicated block in your MPMissions init.sqf file ->

 

if (!isDedicated) then {

   ...jadajada... //just an example, don't change to this :D

   <--Place code-->

};

 

Place this code:

	waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; 
	if (dayzPlayerLogin2 select 2) then {
		[] execVM "custom\spawn_select\Spawn.sqf"; 
	}; //After this comes the !isDedicated condition ending bracket!

2) Open your description.ext and paste this to the end:

#include "custom\spawn_select\dialogs.hpp"

3) Unpbo your dayz_server.pbo and open file dayz_server\compile\server_playerSetup.sqf and change this (around line 236):

dayzPlayerLogin2 = [_worldspace,_state];

to this:

dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];

4) Repbo your dayz_server and enjoy :)

Link to comment
Share on other sites

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
×
×
  • Create New...