Jump to content
Sign in to follow this  
frezinator

How to create more than one respawn???

Recommended Posts

How do you create multiple respawns??? how do you make it also selective ??? For example: if you died you can choose a spawn point

Share this post


Link to post
Share on other sites

Hi, try this:

Pick spawn from Menu

This will create a menu with a gui, with a list of spawn locations you define.

Create the following scripts:

note you may have to update the respawndelay for the time you want as currently its set for 3 sec

for the maxplayers under class header its set to 3 players, up that number if you want more.

Description.ext

respawn = base;
respawndelay = 3;
respawndialog = 0;
class header {
gametype = coop;
maxplayers = 3;
minplayers = 1;
};
class doostatic {
type = 0;
idc = -1;
style = 0;
x = 0;
y = 0;
w = 1;
h = 1;
colorBackground[] = {0, 0, 0, 0.75};
colorText[] = {0, 0, 0, 1};
font = "Zeppelin32";
sizeEx = 0.023;
text = "";
};
class doobutton {
type = 1;
idc = -1;
style = "0x02 + 0x100";
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
colorText[] = {0.543, 0.5742, 0.4102, 1};
colorDisabled[] = {0.4, 0.4, 0.4, 1};
font = "Zeppelin32";
sizeEx = 0.03921;
text = "";
colorBackground[] = {1, 0.537, 0, 0.5};
colorBackgroundActive[] = {1, 0.537, 0, 1};
colorBackgroundDisabled[] = {0.95, 0.95, 0.95, 1};
colorFocused[] = {1, 0.537, 0, 1};
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = {0.023529, 0, 0.0313725, 1};
colorBorder[] = {0.023529, 0, 0.0313725, 1};
borderSize = 0;
soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};
soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};
soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};
soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};
};
class doolistbox {
type = 5;
idc = -1;
style = "0 + 0x10";
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0.543, 0.5742, 0.4102, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1};
class ScrollBar {
thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
border = "\ca\ui\data\ui_border_scroll_ca.paa";
};
font = "Zeppelin32";
sizeEx = 0.03921;
rowHeight = 0.05;
autoScrollRewind = 0;
autoScrollDelay = 1;
autoScrollSpeed = -1;
maxHistoryDelay = 1;
};
class doodialog {
idd = 3000;
class controls {
class title : doostatic {
idc = 3001;
};
class mylistbox : doolistbox {
idc = 3002;
x = 0.152782;
y = 0.27103;
w = 0.39;
h = 0.483;
onlbdblclick = "[] spawn doobuy";
};
class okbutton : doobutton {
idc = 3003;
x = 0.752;
y = 0.7625;
text = "$STR_DISP_OK";
onbuttonclick = "[] spawn doobuy";
default = 1;

};
class cancelbutton : doobutton {
idc = 3004;
x = 0.552;
y = 0.7625;
text = "$STR_DISP_CANCEL";
onbuttonclick = "closedialog 3000";
}; 
};
};

Buy.sqf

_lbdata = lbdata [3002, lbcursel 3002];
if (_lbdata == "") exitwith {[playerside, "hq"] sidechat "No item selected"};

if ({alive _x} count doorespawnarray != 0) then {
{
if (str _x == _lbdata) exitwith {
_r = random 360;
vehicle player setdir _r - 180;
vehicle player setpos [((getpos _x) select 0) + sin _r * 10, ((getpos _x) select 1) + cos _r * 10, 0];
};
} foreach doorespawnarray;
};
closedialog 3000;

Init.sqf

enablesaving [false, false];

doogetloc = {
private "_loc";
_loc = nearestlocations [_this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
	if (text (_loc select 0) != "") then {
		text (_loc select 0)
	} else {
		mapgridposition _this
	};
} else {
	mapgridposition _this
};
};

doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

playerinit.sqf

player setvariable ["BIS_noCoreConversations", true];

[] spawn {
while {true} do {
waituntil {alive player};
titletext ["", "black in"];
if ({alive _x} count doorespawnarray > 1) then {
if createdialog "doodialog" then {
uinamespace setvariable ["doolb", finddisplay 3000 displayctrl 3002];
if not isnull (uinamespace getvariable "doolb") then {
{
if (alive _x) then {
_index = (uinamespace getvariable "doolb") lbadd (gettext (configfile >> "CfgVehicles" >> typeof _x >> "displayName") + " at " + (getpos _x call doogetloc));
(uinamespace getvariable "doolb") lbsetdata [_index, str _x];
};
} foreach doorespawnarray;
};
};
};
sleep 5;
waituntil {not alive player};
if dialog then {closedialog 3000};
sleep (playerrespawntime - 2);
titletext ["", "black out"];
};
};

doobuy = compile preprocessfile "buy.sqf";

Editor

Place Flags

The way this respawn works is in the editor you place flags at those locations you wish to respawn at.

The flag would be named flag1, flag2, flag3, flag4, flag5, ect,.

Place Trigger

place a trigger with this code in the init line:

_dummy = [] execvm "playerinit.sqf"

place code in condition:

local player

Respawn Menu

When you get killed or respawn a transparent black screen pops up, and a list on the left shows what spawn you have to choose from.

and at the bottom of the screen you have an cancel button and an ok button.

If you choose your spawn and then hit ok then obviously you will respawn at that spawn. If you hit cancel then you will respawn right

where you are, basically where you died. You can remove the cancel button via the description.ext and then

you are forced to spawn at an location on the list, or menu.

If you dont want to use the respawn menu anytime in the mission your in when you have died,

then just hist esc and you will respawn where you died.

Hope that helps.

Edited by Gnter Severloh

Share this post


Link to post
Share on other sites
Hi, try this:

Pick spawn from Menu

This will create a menu with a gui, with a list of spawn locations you define.

Create the following scripts:

note you may have to update the respawndelay for the time you want as currently its set for 3 sec

for the maxplayers under class header its set to 3 players, up that number if you want more.

Description.ext

respawn = base;
respawndelay = 3;
respawndialog = 0;
class header {
gametype = coop;
maxplayers = 3;
minplayers = 1;
};
class doostatic {
type = 0;
idc = -1;
style = 0;
x = 0;
y = 0;
w = 1;
h = 1;
colorBackground[] = {0, 0, 0, 0.75};
colorText[] = {0, 0, 0, 1};
font = "Zeppelin32";
sizeEx = 0.023;
text = "";
};
class doobutton {
type = 1;
idc = -1;
style = "0x02 + 0x100";
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
colorText[] = {0.543, 0.5742, 0.4102, 1};
colorDisabled[] = {0.4, 0.4, 0.4, 1};
font = "Zeppelin32";
sizeEx = 0.03921;
text = "";
colorBackground[] = {1, 0.537, 0, 0.5};
colorBackgroundActive[] = {1, 0.537, 0, 1};
colorBackgroundDisabled[] = {0.95, 0.95, 0.95, 1};
colorFocused[] = {1, 0.537, 0, 1};
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorShadow[] = {0.023529, 0, 0.0313725, 1};
colorBorder[] = {0.023529, 0, 0.0313725, 1};
borderSize = 0;
soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};
soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};
soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};
soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};
};
class doolistbox {
type = 5;
idc = -1;
style = "0 + 0x10";
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0.543, 0.5742, 0.4102, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1};
class ScrollBar {
thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
border = "\ca\ui\data\ui_border_scroll_ca.paa";
};
font = "Zeppelin32";
sizeEx = 0.03921;
rowHeight = 0.05;
autoScrollRewind = 0;
autoScrollDelay = 1;
autoScrollSpeed = -1;
maxHistoryDelay = 1;
};
class doodialog {
idd = 3000;
class controls {
class title : doostatic {
idc = 3001;
};
class mylistbox : doolistbox {
idc = 3002;
x = 0.152782;
y = 0.27103;
w = 0.39;
h = 0.483;
onlbdblclick = "[] spawn doobuy";
};
class okbutton : doobutton {
idc = 3003;
x = 0.752;
y = 0.7625;
text = "$STR_DISP_OK";
onbuttonclick = "[] spawn doobuy";
default = 1;

};
class cancelbutton : doobutton {
idc = 3004;
x = 0.552;
y = 0.7625;
text = "$STR_DISP_CANCEL";
onbuttonclick = "closedialog 3000";
}; 
};
};

Buy.sqf

_lbdata = lbdata [3002, lbcursel 3002];
if (_lbdata == "") exitwith {[playerside, "hq"] sidechat "No item selected"};

if ({alive _x} count doorespawnarray != 0) then {
{
if (str _x == _lbdata) exitwith {
_r = random 360;
vehicle player setdir _r - 180;
vehicle player setpos [((getpos _x) select 0) + sin _r * 10, ((getpos _x) select 1) + cos _r * 10, 0];
};
} foreach doorespawnarray;
};
closedialog 3000;

Init.sqf

enablesaving [false, false];

doogetloc = {
       if (!isNil "doorespawn_names") exitWith {
           doorespawn_names select (doorespawnarray find _this)
       };
private "_loc";
_loc = nearestlocations [getPos _this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
if (text (_loc select 0) != "") then {
text (_loc select 0)
} else {
mapgridposition _this
};
} else {
mapgridposition _this
};
};

doorespawn_names = ["Spawn 1", "Spawn 2", "Spawn 3", "Spawn 4", "Spawn 5"];
doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

Player.sqf

player creatediaryrecord ["diary", ["About", "<br /><br />Map by Doolittle"]];
player setvariable ["BIS_noCoreConversations", true];

[] spawn {
while {true} do {
waituntil {alive player};
titletext ["", "black in"];
if ({alive _x} count doorespawnarray > 1) then {
if createdialog "doodialog" then {
uinamespace setvariable ["doolb", finddisplay 3000 displayctrl 3002];
if not isnull (uinamespace getvariable "doolb") then {
{
if (alive _x) then {
_index = (uinamespace getvariable "doolb") lbadd (gettext (configfile >> "CfgVehicles" >> typeof _x >> "displayName") + " at " + (getpos _x call doogetloc));
(uinamespace getvariable "doolb") lbsetdata [_index, str _x];
};
} foreach doorespawnarray;
};
};
};
sleep 5;
waituntil {not alive player};
if dialog then {closedialog 3000};
sleep (playerrespawntime - 2);
titletext ["", "black out"];
};
};

doobuy = compile preprocessfile "buy.sqf";

Editor

Place Flags

The way this respawn works is in the editor you place flags at those locations you wish to respawn at.

The flag would be named flag1, flag2, flag3, flag4, flag5, ect,.

Place Trigger

then place a trigger with this code in the init line:

_dummy = [] execvm "playerinit.sqf"

Respawn Menu

When you get killed or respawn a transparent black screen pops up, and a list on the left shows what spawn you have to choose from.

and at the bottom of the screen you have an cancel button and an ok button.

If you choose your spawn and then hit ok then obviously you will respawn at that spawn. If you hit cancel then you will respawn right

where you are, basically where you died. You can remove the cancel button via the description.ext and then

you are forced to spawn at an location on the list, or menu.

If you dont want to use the respawn menu anytime in the mission your in when you have died,

then just hist esc and you will respawn where you died.

Hope that helps.

Omg THank you so much!!!!!!!!!!!!!!!!! I've been posting threads to ask for help but no one is answering :( your the only who helped, Thank you so much really appreciate it!!! im gonna try it out and let you know if it works!! Brb

---------- Post added at 01:52 ---------- Previous post was at 00:32 ----------

I just finished testing, im halfway there. I think im doing something wrong

This is what I did:

1. I put all the scripts in my mission file. (including putting all codes to my description.ext and init.sqf)

2. I went to to the mission editor and start editing my mission.

3. I deleted respawn_west.

4. I added two USA flags and named them flag1 and flag2.

5. I made a trigger and set it to:

Axis: 0 Axis B:0

Once

Present

Blufor

Activation type: None

Condition: this

On activation: _dummy = [] execvm "player.sqf"

Note: I changed _dummy = [] execvm "playerinit.sqf" to _dummy = [] execvm "player.sqf" because when I tried _dummy = [] execvm "playerinit.sqf" it just tells me playerinit.sqf is not found.

6. I start to preview my mission

My Results: When the mission starts I already see the transparent black box.... I haven't even died yet... the box already showed up.. The transparent black box is empty except with two orange little boxes called "Cancel" and "OK". I don't see any respawns list in the black box, am I doing something wrong????

Questions: What do I remove in the description.ext if I want to the remove the word "Cancel"??? and What do I do to make the black box only shows when Im dead???

Edited by frezinator

Share this post


Link to post
Share on other sites

Your welcome, just point out that its not necessary to quote my whole post, as i know what i said, only time you should quote is

specific things in a post your asking about, or if another forum member replied after me.

5. I made a trigger and set it to:

all you need is just a trigger dont edit it, just create a trigger and add the code:

_dummy = [] execvm "player.sqf"

Note: I changed _dummy = [] execvm "playerinit.sqf" to _dummy = [] execvm "player.sqf" because when I tried _dummy = [] execvm "playerinit.sqf" it just tells me playerinit.sqf is not found.

My bad the name of the script was supposed to be playerinit.sqf but I forgot to add the init when i typed it out, just change

the script name to playerinit.sqf, and make sure the code in the trigger reflects that.

When the mission starts I already see the transparent black box.... I haven't even died yet.

Of course its asking you where you want to spawn at, thats whats supposed to happen, if you dont want to spawn anywhere in particular then hit esc.

Questions: What do I remove in the description.ext if I want to the remove the word "Cancel"???

In the description.ext remove this code which is at the bottom of the script:

class cancelbutton : doobutton {
idc = 3004;
x = 0.552;
y = 0.7625;
text = "$STR_DISP_CANCEL";
onbuttonclick = "closedialog 3000";
}; 

What do I do to make the black box only shows when Im dead???

Have no idea.

============

i have another pick spawn from menu variation I ported over from Arma1 if your interested, it has the same context

or idea as the pick spawn from menu except instead you have a zoomable map in the dialog box and buttons.

Share this post


Link to post
Share on other sites
Your welcome, just point out that its not necessary to quote my whole post, as i know what i said, only time you should quote is

specific things in a post your asking about, or if another forum member replied after me.

all you need is just a trigger dont edit it, just create a trigger and add the code:

_dummy = [] execvm "player.sqf"

My bad the name of the script was supposed to be playerinit.sqf but I forgot to add the init when i typed it out, just change

the script name to playerinit.sqf, and make sure the code in the trigger reflects that.

Of course its asking you where you want to spawn at, thats whats supposed to happen, if you dont want to spawn anywhere in particular then hit esc.

In the description.ext remove this code which is at the bottom of the script:

class cancelbutton : doobutton {
idc = 3004;
x = 0.552;
y = 0.7625;
text = "$STR_DISP_CANCEL";
onbuttonclick = "closedialog 3000";
}; 

Have no idea.

============

i have another pick spawn from menu variation I ported over from Arma1 if your interested, it has the same context

or idea as the pick spawn from menu except instead you have a zoomable map in the dialog box and buttons.

KK I made a trigger and put "_dummy = [] execvm "player.sqf" on the activation code, I didn't edit the trigger, when I respawn no black box shows up....

So I tried making a "game logic" then "objects" (which looks like a trigger too) then I put in the init: "_dummy = [] execvm "player.sqf"

When I respawn the black box shows up!!! but the black box is still empty.... I only see "Cancel" and "Ok"... I don't see respawns list like flag1 and flag2... I can't pick any respawns because it shows none..

How many flags do I need to put??? is there something else do I need to add?? do I need to add respawn_west???

Sorry for asking too many questions, im trying my best to figure out how to make this works.

Does the pick spawn menu from Arma 1 works with Arma 2???

Edited by frezinator

Share this post


Link to post
Share on other sites

Sorry i found the issue I had to update the script, apparently i was using a code I was testing last year

sometime and I forget if it worked or not, probably not, but update the playerinit.sqf with this:

player setvariable ["BIS_noCoreConversations", true];

[] spawn {
while {true} do {
waituntil {alive player};
titletext ["", "black in"];
if ({alive _x} count doorespawnarray > 1) then {
if createdialog "doodialog" then {
uinamespace setvariable ["doolb", finddisplay 3000 displayctrl 3002];
if not isnull (uinamespace getvariable "doolb") then {
{
if (alive _x) then {
_index = (uinamespace getvariable "doolb") lbadd (gettext (configfile >> "CfgVehicles" >> typeof _x >> "displayName") + " at " + (getpos _x call doogetloc));
(uinamespace getvariable "doolb") lbsetdata [_index, str _x];
};
} foreach doorespawnarray;
};
};
};
sleep 5;
waituntil {not alive player};
if dialog then {closedialog 3000};
sleep (playerrespawntime - 2);
titletext ["", "black out"];
};
};

doobuy = compile preprocessfile "buy.sqf";

then be sure the player.sqf you have says this playerinit.sqf

then in the trigger in the mission under condition put:

local player

lastly you'll want at least 2 flags, and the flags you place will add the names of the nearest town so if for example your on

utes then the nearest town could be either strelka or kameny.

If you palce more then 2 flags then those names will repeat themselves based on which town is nearest.

I had it setup before where I had the menu with spawn 1, spawn 2, ect,. I may try that again. But i had updated my original post if your not sure.

Try it out and let me know.

again sorry about that.

Does the pick spawn menu from Arma 1 works with Arma 2???

I have one that I had ported over from Arma1, and yes it does work in Arma2CO np, as codes from OFP could be used too,

and they should work, remember your using the codes on the same engine but the engine just has been updated and more optimized.

try the current menu first and then when it works fro you i will post the other one on how to set it up.

Share this post


Link to post
Share on other sites
Sorry i found the issue I had to update the script, apparently i was using a code I was testing last year

sometime and I forget if it worked or not, probably not, but update the playerinit.sqf with this:

player setvariable ["BIS_noCoreConversations", true];

[] spawn {
while {true} do {
waituntil {alive player};
titletext ["", "black in"];
if ({alive _x} count doorespawnarray > 1) then {
if createdialog "doodialog" then {
uinamespace setvariable ["doolb", finddisplay 3000 displayctrl 3002];
if not isnull (uinamespace getvariable "doolb") then {
{
if (alive _x) then {
_index = (uinamespace getvariable "doolb") lbadd (gettext (configfile >> "CfgVehicles" >> typeof _x >> "displayName") + " at " + (getpos _x call doogetloc));
(uinamespace getvariable "doolb") lbsetdata [_index, str _x];
};
} foreach doorespawnarray;
};
};
};
sleep 5;
waituntil {not alive player};
if dialog then {closedialog 3000};
sleep (playerrespawntime - 2);
titletext ["", "black out"];
};
};

doobuy = compile preprocessfile "buy.sqf";

then be sure the player.sqf you have says this playerinit.sqf

then in the trigger in the mission under condition put:

local player

lastly you'll want at least 2 flags, and the flags you place will add the names of the nearest town so if for example your on

utes then the nearest town could be either strelka or kameny.

If you palce more then 2 flags then those names will repeat themselves based on which town is nearest.

I had it setup before where I had the menu with spawn 1, spawn 2, ect,. I may try that again. But i had updated my original post if your not sure.

Try it out and let me know.

again sorry about that.

I have one that I had ported over from Arma1, and yes it does work in Arma2CO np, as codes from OFP could be used too,

and they should work, remember your using the codes on the same engine but the engine just has been updated and more optimized.

try the current menu first and then when it works fro you i will post the other one on how to set it up.

It still won't work :( I don't see the blackbox this time...

Does the init.sqf need some changes?? im just curious because I see the words "spawn 1,spawn 2, etc.."

enablesaving [false, false];

doogetloc = {
       if (!isNil "doorespawn_names") exitWith {
           doorespawn_names select (doorespawnarray find _this)
       };
private "_loc";
_loc = nearestlocations [getPos _this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
if (text (_loc select 0) != "") then {
text (_loc select 0)
} else {
mapgridposition _this
};
} else {
mapgridposition _this
};
};

doorespawn_names = ["Spawn 1", "Spawn 2", "Spawn 3", "Spawn 4", "Spawn 5"];
doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

This is my actual init.sqf looks like:

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
};

//Init UPSMON scritp (must be run on all clients)
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";	
//Process statements stored using setVehicleInit
processInitCommands;
//Finish world initialization before mission is launched. 
finishMissionInit;

enablesaving [false, false];

doogetloc = {
       if (!isNil "doorespawn_names") exitWith {
           doorespawn_names select (doorespawnarray find _this)
       };
private "_loc";
_loc = nearestlocations [getPos _this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
if (text (_loc select 0) != "") then {
text (_loc select 0)
} else {
mapgridposition _this
};
} else {
mapgridposition _this
};
};

doorespawn_names = ["Spawn 1", "Spawn 2", "Spawn 3", "Spawn 4", "Spawn 5"];
doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

{_x setMarkerAlphaLocal 0} foreach ["w1","w2","w3","w4","w5","w6","d1","d2","d3","d4"];

execVM "tk_protection\tk_init.sqf";

[player,0.2,0.15,3,true] execVM "cly_heal.sqf";

execVM "DRN\DynamicWeatherEffects\DynamicWeatherEffects.sqf";

veh = [this] execVM "vehicle.sqf";

//begin init.sqf

//Add briefing
execVM "briefing.sqf";

if(true) exitWith {};

Could you just make a quick sample mission?

Edited by frezinator

Share this post


Link to post
Share on other sites

Sorry I been very tired this weekend, but ya change the init.SQF to this:

init.sqf

enablesaving [false, false];

doogetloc = {
private "_loc";
_loc = nearestlocations [_this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
	if (text (_loc select 0) != "") then {
		text (_loc select 0)
	} else {
		mapgridposition _this
	};
} else {
	mapgridposition _this
};
};

doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

refer to my original post if your not sure as i had updated everything on that post.

Share this post


Link to post
Share on other sites
Sorry I been very tired this weekend, but ya change the init.SQF to this:

init.sqf

enablesaving [false, false];

doogetloc = {
private "_loc";
_loc = nearestlocations [_this, ["NameCityCapital", "NameCity", "NameVillage", "NameLocal", "Hill", "NameMarine"], 1500];
if (count _loc != 0) then {
	if (text (_loc select 0) != "") then {
		text (_loc select 0)
	} else {
		mapgridposition _this
	};
} else {
	mapgridposition _this
};
};

doorespawnarray = [flag1, flag2, flag3, flag4, flag5];
titletext ["","black faded"];

if not isserver exitwith {};

refer to my original post if your not sure as i had updated everything on that post.

Finalllllllllllllllllly!!!!!!!!!!!! it worked!!!!!!!!!!!! after all those countless hours of testing, I could finally get it to worked!!!!!!!!!!!!!! Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:bounce3::eek::yay::bounce3::yay::D:bounce3:

One more thing, im using a R3F revive script but it seems that its not compatible with the respawn script, do you know how to make it compatible or do you know any other revive scripts that is compatible?

Also, My intro image and intro music won't work but the respawn selection works, I can live with that :)

Share this post


Link to post
Share on other sites

Wonderful, sorry for the mistakes before.

I never use revive, and no dont know how to implement it.

Would you be interested in testing out the other menu respawn I was talking about that I had ported over from Arma1?

Share this post


Link to post
Share on other sites
Wonderful, sorry for the mistakes before.

I never use revive, and no dont know how to implement it.

Would you be interested in testing out the other menu respawn I was talking about that I had ported over from Arma1?

Sure I would love to!!!

it's kk, everyone makes mistakes :)

Share this post


Link to post
Share on other sites

Ok. This menu respawn can be tricky but heres what you need to do:

Menu Dialog - Menu respawn

Download the demo mission

Respawn Dialog-Menu Respawn Demo

put the folder into mpmissions folder for the editor, then host the mission and see it in the editor,

also host it to play it as respawn dont work in SP.

=============

You will need to create some folders and a few scripts, just follow the steps:

Step A

Folders

1. create a folder and name it Dialogs

2. create a folder and name it Scripts

Dialogs Folder

1. Inside this folder create a folder and name it Common

Scripts inside Dialogs folder:

1. Create a script and name it Respawn_Dialog.hpp

then put the following code inside the script:

// Desc: A respawn selection dialog
// By: Dr Eyeball
// Version: 1.0 (May 2007)
//-----------------------------------------------------------------------------
// SPWN_ is the unique prefix associated with all unique classes for this dialog.

//-----------------------------------------------------------------------------
// IDD's & IDC's
//-----------------------------------------------------------------------------
#define SPWN_IDD_RespawnDialog 389

#define SPWN_IDC_RespawnList 891
#define SPWN_IDC_RespawnMap 892
#define SPWN_IDC_AcceptButton 893
#define SPWN_IDC_Countdown 894

//-----------------------------------------------------------------------------
// Personalisation - Custom modifications to the standard control classes
//-----------------------------------------------------------------------------

class SPWN_Button: RscButton
{
 x = 1*Dlg_COLWIDTH;
 y = 0.1;
 w = 0.1;
 h = Dlg_CONTROLHGT;
};

class SPWN_BaselineButton: SPWN_Button
{
 w = 0.15;
 y = 1.0-Dlg_CONTROLHGT; // last row
};

class SPWN_CaptionText: RscText
{
};

//-----------------------------------------------------------------------------
// Main dialog
//-----------------------------------------------------------------------------
class SPWN_RespawnDialog
{
 idd = SPWN_IDD_RespawnDialog;

 movingEnable = true;
 controlsBackground[] = { SPWN_Background, SPWN_Frame };

 class SPWN_Background: Dlg_FullBackground
 {
   colorBackground[] = {Dlg_Color_Gray_3, 0.7};
 };

 class SPWN_Frame: Dlg_FullBackgroundFrame
 {
   text = " Respawn Location Selection ";
 };

 //---------------------------------------------
 objects[] = 
 { 
 };

 controls[] = 
 {
   SPWN_RespawnListCaption,
   SPWN_RespawnList,

   SPWN_RespawnMapCaption,
   SPWN_RespawnMap,

   SPWN_AcceptButton
 };
 //---------------------------------------------
 // captions
 class SPWN_RespawnListCaption: SPWN_CaptionText
 {
   idc = SPWN_IDC_Countdown;
   x = 0.01;
   y = 0.03;
   w = 0.51;
   text = "Respawn Locations";
 };
 class SPWN_RespawnMapCaption: SPWN_CaptionText
 {
   x = 0.01;
   y = 0.32;
   w = 0.51;
   text = "Respawn Locations Map";
 };
 //---------------------------------------------
 // Controls
 class SPWN_RespawnList: RscListBox
 { 
   idc = SPWN_IDC_RespawnList;
   x = 0.01;
   y = 0.07;
   w = 0.51;
   h = 0.2;

   onLBSelChanged = "[_this] call SPWN_ViewSpawnPoint";
   onLBDblClick = "[_this] call SPWN_AcceptButton";
 };
 class SPWN_RespawnMap: RscMapControl
 {
   idc = SPWN_IDC_RespawnMap; 
   x = 0.01;
   y = 0.36;
     w    = 0.51;
     h    = 0.6; 
 };
 //---------------------------------------------
 // buttons
 class SPWN_AcceptButton: SPWN_BaselineButton
 {
     idc = SPWN_IDC_AcceptButton;
     x = 5*Dlg_COLWIDTH;
     text = "Ok";
     action = "[] call SPWN_AcceptButton";
 };
 //---------------------------------------------
};

2. Create a script and name it Respawn_Dialog.sqf (note its a sqf this time)

then put the following code inside the script:

// Desc: A respawn selection dialog
// By: Dr Eyeball
// Version: 1.0 (May 2007)
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
// The following IDD & IDC variables should match their equivalents for the dialog (from "Dialogs\RespawnDialog.hpp")
SPWN_IDD_RespawnDialog = 389;

SPWN_IDC_RespawnList = 891;
SPWN_IDC_RespawnMap = 892;
SPWN_IDC_AcceptButton = 893;
SPWN_IDC_Countdown = 894;

SPWN_RespawnLocationsCaption = "Respawn Locations";

//-----------------------------------------------------------------------------
// Control functions
//-----------------------------------------------------------------------------
SPWN_FillComboList = 
{
 _idc2 = _this select 0;
 _DualList = _this select 1;

 _control = SPWN_display displayCtrl _idc2;

 lbClear _idc2;
 {
   _Item = _x select 0;
   _Data = _x select 1;
   _index = lbAdd [_idc2, _Item];
   lbSetData [_idc2, _index, _Data];
 } forEach _DualList;

 lbSetCurSel [_idc2, 0];
};
//-----------------------------------------------------------------------------
// Respawn Selection functions
//-----------------------------------------------------------------------------

//----------------------
SPWN_ViewSpawnPoint =
{
 _selection = _this select 0;  

 _control = _selection select 0;
 _selectedIndex = _selection select 1; 

 _basePos = getPos player;
 _spawnMarkerName = _control lbData _selectedIndex;
 _spawnPos = getmarkerpos _spawnMarkerName; 

 //RespawnLocation = _spawnMarkerName; // interferes

 //---- show map location using panning & zooming
 _ctrl = SPWN_display displayctrl SPWN_IDC_RespawnMap;
 ctrlMapAnimClear _ctrl; // reset while scrolling list

 _ctrl ctrlmapanimadd [0.1, 0.30, _basePos]; // show home base
 ctrlmapanimcommit _ctrl;

 _ctrl ctrlmapanimadd [0.8, 0.90, _spawnPos]; // show map location
 ctrlmapanimcommit _ctrl;

 _ctrl ctrlmapanimadd [0.1, 0.20, _spawnPos]; // zoom map location
 ctrlmapanimcommit _ctrl;
};
//----------------------
SPWN_AcceptButton =
{
 _selectedIndex = lbCurSel SPWN_IDC_RespawnList;

 RespawnLocation = lbData [sPWN_IDC_RespawnList, _selectedIndex]; // assign marker name to global var

 player globalChat format["Spawn location %1 selected. Marker name='%2'", 
   _selectedIndex, lbData [sPWN_IDC_RespawnList, _selectedIndex] ]; // debug

 closeDialog 0;
};
//----------------------
SPWN_Start =
{
 _Params = _this;

 _MyDualList =
 [ // [spawn description, marker name]
   ["1 - Base", "m_Start"],
   ["2 - Spawn2", "m_WestSpawn2"],
   ["3 - Spawn3", "m_WestSpawn3"],
   ["4 - Spawn4", "m_WestSpawn4"],
   ["5 - Spawn5", "m_WestSpawn5"]
 ];

 [sPWN_IDC_RespawnList, _MyDualList] call SPWN_FillComboList;
 //---------------------
 // find & focus current respawn location marker
 _MatchingIndex = 0;
 _Size = lbSize SPWN_IDC_RespawnList;
 for [{_i = 0}, {_i < _Size}, {_i = _i + 1}] do
 {
   if (RespawnLocation == lbData [sPWN_IDC_RespawnList, _i]) then 
   {
     _MatchingIndex = _i;
   };
 };

 lbSetCurSel [sPWN_IDC_RespawnList, _MatchingIndex];
};
//-----------------------------------------------------------------------------
// Init
//-----------------------------------------------------------------------------

_ok = createDialog "SPWN_RespawnDialog";
if !(_ok) exitWith { hint "createDialog failed" };

SPWN_display = findDisplay SPWN_IDD_RespawnDialog; 

_Params = _this;
[_Params] call SPWN_Start;

// show the countdown time
while { dialog && playerRespawnTime > -1 } do
{
 _timeRemaining = format["%1 - %2 seconds", SPWN_RespawnLocationsCaption, playerRespawnTime];
 ctrlSetText [sPWN_IDC_Countdown, _timeRemaining];
 sleep 1.0;
};
ctrlSetText [sPWN_IDC_Countdown, SPWN_RespawnLocationsCaption];

Common Folder

1. create a script and name it DialogColorConstants.hpp

then put the following code inside the script:

// Desc: A large selection of #define color constants.
// By: Dr Eyeball
// Version: 0.01 alpha (May 2007)

//-----------------------------------------------------------------------------
// Color Scheme - constants
//-----------------------------------------------------------------------------
#define Dlg_ColorScheme_DialogBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_DialogText Dlg_Color_white

#define Dlg_ColorScheme_ControlBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_ControlText Dlg_Color_white

#define Dlg_ColorScheme_ButtonBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_ButtonText Dlg_Color_white

#define Dlg_ColorScheme_HighlightBackground Dlg_Color_paleBlue2
#define Dlg_ColorScheme_HighlightText Dlg_Color_white

//-----------------------------------------------------------------------------
// Color attributes
//-----------------------------------------------------------------------------

#define Dlg_ColorAttribute_Clear {0, 0, 0, 0}

//-----------------------------------------------------------------------------
// Main base colors
//-----------------------------------------------------------------------------

#define Dlg_Color_Black 0,0,0
#define Dlg_Color_White 1,1,1

// additive primaries
#define Dlg_Color_Red 1,0,0
#define Dlg_Color_Lime 0,1,0
#define Dlg_Color_Blue 0,0,1

// subtractive primaries
#define Dlg_Color_Yellow 1,1,0
#define Dlg_Color_Fuchsia 1,0,1 // Dlg_Color_Magenta
#define Dlg_Color_Aqua 0,1,1 // Dlg_Color_Cyan

// shades
#define Dlg_Color_Maroon 0.5,0,0
#define Dlg_Color_Green 0,0.5,0
#define Dlg_Color_Navy 0,0,0.5

#define Dlg_Color_Olive 0.5,0.5,0
#define Dlg_Color_Purple 0.5,0,0.5
#define Dlg_Color_Teal 0,0.5,0.5

// grays
#define Dlg_Color_Gray 0.5,0.5,0.5 // Dlg_Color_DkGray
#define Dlg_Color_Silver 0.75,0.75,0.75 // Dlg_Color_LtGray
#define Dlg_Color_LtGray 0.75,0.75,0.75 // Dlg_Color_Silver
#define Dlg_Color_DkGray 0.5,0.5,0.5 // Dlg_Color_Gray

// 0.1 is darkest (near black) 0.9 is lightest (near white)
#define Dlg_Color_Gray_1 0.1,0.1,0.1
#define Dlg_Color_Gray_2 0.2,0.2,0.2
#define Dlg_Color_Gray_3 0.3,0.3,0.3
#define Dlg_Color_Gray_4 0.4,0.4,0.4
#define Dlg_Color_Gray_5 0.5,0.5,0.5
#define Dlg_Color_Gray_6 0.6,0.6,0.6
#define Dlg_Color_Gray_7 0.7,0.7,0.7
#define Dlg_Color_Gray_8 0.8,0.8,0.8
#define Dlg_Color_Gray_9 0.9,0.9,0.9

//-----------------------------------------------------------------------------
// Extended colors - based on 'html'/'web' colors
//-----------------------------------------------------------------------------
#define Dlg_Color_AliceBlue 0.937500,0.968750,1.000000
#define Dlg_Color_AntiqueWhite 0.976563,0.917969,0.839844
#define Dlg_Color_Aquamarine 0.496094,1.000000,0.828125
#define Dlg_Color_Azure 0.937500,1.000000,1.000000
#define Dlg_Color_Beige 0.957031,0.957031,0.859375
#define Dlg_Color_Bisque 1.000000,0.890625,0.765625
//#define Dlg_Color_Black 0.000000,0.000000,0.000000
#define Dlg_Color_BlanchedAlmond 1.000000,0.917969,0.800781
//#define Dlg_Color_Blue 0.000000,0.000000,1.000000
#define Dlg_Color_BlueViolet 0.539063,0.167969,0.882813
#define Dlg_Color_Brown 0.644531,0.164063,0.164063
#define Dlg_Color_Burlywood 0.867188,0.718750,0.527344
#define Dlg_Color_CadetBlue 0.371094,0.617188,0.625000
#define Dlg_Color_Chartreuse 0.496094,1.000000,0.000000
#define Dlg_Color_Chocolate 0.820313,0.410156,0.117188
#define Dlg_Color_Coral 1.000000,0.496094,0.312500
#define Dlg_Color_CornFlowerBlue 0.390625,0.582031,0.925781
#define Dlg_Color_CornSilk 1.000000,0.968750,0.859375
#define Dlg_Color_Crimson 0.859375,0.078125,0.234375
#define Dlg_Color_Cyan 0.000000,1.000000,1.000000 // Dlg_Color_Aqua
#define Dlg_Color_DarkBlue 0.000000,0.000000,0.542969
#define Dlg_Color_DarkCyan 0.000000,0.542969,0.542969
#define Dlg_Color_DarkGoldenRod 0.718750,0.523438,0.042969
#define Dlg_Color_DarkGray 0.660156,0.660156,0.660156
#define Dlg_Color_Darkgreen 0.000000,0.390625,0.000000
#define Dlg_Color_DarkKhaki 0.738281,0.714844,0.417969
#define Dlg_Color_DarkMagenta 0.542969,0.000000,0.542969
#define Dlg_Color_DarkOliveGreen 0.332031,0.417969,0.183594
#define Dlg_Color_DarkOrange 1.000000,0.546875,0.000000
#define Dlg_Color_DarkOrchid 0.597656,0.195313,0.796875
#define Dlg_Color_DarkRed 0.542969,0.000000,0.000000
#define Dlg_Color_DarkSalmon 0.910156,0.585938,0.476563
#define Dlg_Color_DarkSeaGreen 0.558594,0.734375,0.558594
#define Dlg_Color_DarkSlateBlue 0.281250,0.238281,0.542969
#define Dlg_Color_DarkSlategray 0.183594,0.308594,0.308594
#define Dlg_Color_DarkTurquoise 0.000000,0.804688,0.816406
#define Dlg_Color_DarkViolet 0.578125,0.000000,0.824219
#define Dlg_Color_DeepPink 1.000000,0.078125,0.574219
#define Dlg_Color_DeepskyBlue 0.000000,0.746094,1.000000
#define Dlg_Color_DimGray 0.410156,0.410156,0.410156
#define Dlg_Color_DodgerBlue 0.117188,0.562500,1.000000
#define Dlg_Color_Firebrick 0.695313,0.132813,0.132813
#define Dlg_Color_FloralWhite 1.000000,0.976563,0.937500
#define Dlg_Color_ForestGreen 0.132813,0.542969,0.132813
#define Dlg_Color_Gainsboro 0.859375,0.859375,0.859375
#define Dlg_Color_GhostWhite 0.968750,0.968750,1.000000
#define Dlg_Color_Gold 1.000000,0.839844,0.000000
#define Dlg_Color_GoldenRod 0.851563,0.644531,0.125000
//#define Dlg_Color_Gray 0.500000,0.500000,0.500000
//#define Dlg_Color_Green 0.000000,0.500000,0.000000
#define Dlg_Color_GreenYellow 0.675781,1.000000,0.183594
#define Dlg_Color_Honeydew 0.937500,1.000000,0.937500
#define Dlg_Color_HotPink 1.000000,0.410156,0.703125
#define Dlg_Color_IndianRed 0.800781,0.359375,0.359375
#define Dlg_Color_Indigo 0.292969,0.000000,0.507813
#define Dlg_Color_Ivory 1.000000,1.000000,0.937500
#define Dlg_Color_Khaki 0.937500,0.898438,0.546875
#define Dlg_Color_Lavender 0.898438,0.898438,0.976563
#define Dlg_Color_LavenderBlush 1.000000,0.937500,0.957031
#define Dlg_Color_LawnGreen 0.484375,0.984375,0.000000
#define Dlg_Color_LemonChiffon 1.000000,0.976563,0.800781
#define Dlg_Color_LightBlue 0.675781,0.843750,0.898438
#define Dlg_Color_LightCoral 0.937500,0.500000,0.500000
#define Dlg_Color_LightCyan 0.875000,1.000000,1.000000
#define Dlg_Color_LightGoldenrodYellow 0.976563,0.976563,0.820313
#define Dlg_Color_LightGreen 0.562500,0.929688,0.562500
#define Dlg_Color_Lightgrey 0.824219,0.824219,0.824219
#define Dlg_Color_LightPink 1.000000,0.710938,0.753906
#define Dlg_Color_LightSalmon 1.000000,0.625000,0.476563
#define Dlg_Color_LightSeaGreen 0.125000,0.695313,0.664063
#define Dlg_Color_LightSkyBlue 0.527344,0.804688,0.976563
#define Dlg_Color_LightSlateGray 0.464844,0.531250,0.597656
#define Dlg_Color_LightSteelBlue 0.687500,0.765625,0.867188
#define Dlg_Color_LightYellow 1.000000,1.000000,0.875000
//#define Dlg_Color_Lime 0.000000,1.000000,0.000000
#define Dlg_Color_LimeGreen 0.195313,0.800781,0.195313
#define Dlg_Color_Linen 0.976563,0.937500,0.898438
#define Dlg_Color_Magenta 1.000000,0.000000,1.000000
//#define Dlg_Color_Maroon 0.500000,0.000000,0.000000
#define Dlg_Color_MediumAquamarine 0.398438,0.800781,0.664063
#define Dlg_Color_MediumBlue 0.000000,0.000000,0.800781
#define Dlg_Color_MediumOrchid 0.726563,0.332031,0.824219
#define Dlg_Color_MediumPurple 0.574219,0.437500,0.855469
#define Dlg_Color_MediumSeaGreen 0.234375,0.699219,0.441406
#define Dlg_Color_MediumSlateBlue 0.480469,0.406250,0.929688
#define Dlg_Color_MediumSpringGreen 0.000000,0.976563,0.601563
#define Dlg_Color_MediumTurquoise 0.281250,0.816406,0.796875
#define Dlg_Color_MediumVioletRed 0.777344,0.082031,0.519531
#define Dlg_Color_MidnightBlue 0.097656,0.097656,0.437500
#define Dlg_Color_Mintcream 0.957031,1.000000,0.976563
#define Dlg_Color_MistyRose 1.000000,0.890625,0.878906
#define Dlg_Color_Moccasin 1.000000,0.890625,0.707031
#define Dlg_Color_NavajoWhite 1.000000,0.867188,0.675781
//#define Dlg_Color_Navy 0.000000,0.000000,0.500000
#define Dlg_Color_OldLace 0.988281,0.957031,0.898438
//#define Dlg_Color_Olive 0.500000,0.500000,0.000000
#define Dlg_Color_OliveDrab 0.417969,0.554688,0.136719
#define Dlg_Color_Orange 1.000000,0.644531,0.000000
#define Dlg_Color_OrangeRed 1.000000,0.269531,0.000000
#define Dlg_Color_Orchid 0.851563,0.437500,0.835938
#define Dlg_Color_PaleGoldenrod 0.929688,0.906250,0.664063
#define Dlg_Color_PaleGreen 0.593750,0.980469,0.593750
#define Dlg_Color_PaleTurquoise 0.683594,0.929688,0.929688
#define Dlg_Color_PaleVioletRed 0.855469,0.437500,0.574219
#define Dlg_Color_PapayaWhip 1.000000,0.933594,0.832031
#define Dlg_Color_PeachPuff 1.000000,0.851563,0.722656
#define Dlg_Color_Peru 0.800781,0.519531,0.246094
#define Dlg_Color_Pink 1.000000,0.750000,0.792969
#define Dlg_Color_Plum 0.863281,0.625000,0.863281
#define Dlg_Color_PowderBlue 0.687500,0.875000,0.898438
//#define Dlg_Color_Purple 0.500000,0.000000,0.500000
//#define Dlg_Color_Red 1.000000,0.000000,0.000000
#define Dlg_Color_RosyBrown 0.734375,0.558594,0.558594
#define Dlg_Color_RoyalBlue 0.253906,0.410156,0.878906
#define Dlg_Color_SaddleBrown 0.542969,0.269531,0.074219
#define Dlg_Color_Salmon 0.976563,0.500000,0.445313
#define Dlg_Color_SandyBrown 0.953125,0.640625,0.375000
#define Dlg_Color_SeaGreen 0.179688,0.542969,0.339844
#define Dlg_Color_Seashell 1.000000,0.957031,0.929688
#define Dlg_Color_Sienna 0.625000,0.320313,0.175781
//#define Dlg_Color_Silver 0.750000,0.750000,0.750000
#define Dlg_Color_SkyBlue 0.527344,0.804688,0.917969
#define Dlg_Color_SlateBlue 0.414063,0.351563,0.800781
#define Dlg_Color_SlateGray 0.437500,0.500000,0.562500
#define Dlg_Color_Snow 1.000000,0.976563,0.976563
#define Dlg_Color_SpringGreen 0.000000,1.000000,0.496094
#define Dlg_Color_SteelBlue 0.273438,0.507813,0.703125
#define Dlg_Color_Tan 0.820313,0.703125,0.546875
//#define Dlg_Color_Teal 0.000000,0.500000,0.500000
#define Dlg_Color_Thistle 0.843750,0.746094,0.843750
#define Dlg_Color_Tomato 1.000000,0.386719,0.277344
#define Dlg_Color_Turquoise 0.250000,0.875000,0.812500
#define Dlg_Color_Violet 0.929688,0.507813,0.929688
#define Dlg_Color_Wheat 0.957031,0.867188,0.699219
//#define Dlg_Color_White 1.000000,1.000000,1.000000
#define Dlg_Color_WhiteSmoke 0.957031,0.957031,0.957031
//#define Dlg_Color_Yellow 1.000000,1.000000,0.000000
#define Dlg_Color_YellowGreen 0.601563,0.800781,0.195313

//-----------------------------------------------------------------------------
// Extended colors - a few odd pastel colors
//-----------------------------------------------------------------------------
#define Dlg_Color_MoneyGreen 0.75,0.859375,0.75
//#define Dlg_Color_SkyBlue 0.6484375,0.7890625,0.9375
#define Dlg_Color_Cream 1,0.98046875,0.9375
#define Dlg_Color_MedGray 0.625,0.625,0.640625

2. create a script and name it DialogControlClasses.hpp

then put the following code inside the script:

// Desc: The top section contains the standard dialog #define constants, used for 
// controls, styles & fonts. The bottom section contains the standard base dialog 
// control class definitions, from which you can inherit.
//
// Notes: There are many slightly different versions of this file around.
// By: public code taken from various sources: BIS pbo's, tutorials, WIKI & other scripts
// Colors and coeff's referenced from quickmap.hpp, by mi2slow & Vienna.
//
// Version: 0.01 alpha (May 2007, Dr Eyeball)
//-----------------------------------------------------------------------------

// Constants to standardize and help simplify positioning and sizing
#define Dlg_ROWS 36 // determines default text and control height
#define Dlg_COLS 90 // guide for positioning controls

// (Calculate proportion, then /100 to represent as percentage)
#define Dlg_CONTROLHGT ((100/Dlg_ROWS)/100)
#define Dlg_COLWIDTH ((100/Dlg_COLS)/100)

#define Dlg_ROWHGT_MOD 1.0
#define Dlg_TEXTHGT_MOD 1.3
#define Dlg_ROWSPACING 0.01

#define Dlg_ROWHGT (Dlg_CONTROLHGT/Dlg_ROWHGT_MOD)
#define Dlg_TEXTHGT (Dlg_ROWHGT/Dlg_TEXTHGT_MOD)

//-----------------------------------------------------------------------------
// Fonts
#define FontM "TahomaB"
#define FontHTML "TahomaB"
//"CourierNewB64" "TahomaB" "Bitstream" "Zeppelin32"

//-----------------------------------------------------------------------------
// Control Types 
#define CT_STATIC 0 
#define CT_BUTTON 1 
#define CT_EDIT 2 
#define CT_SLIDER 3 
#define CT_COMBO 4 
#define CT_LISTBOX 5 
#define CT_TOOLBOX 6 
#define CT_CHECKBOXES 7 
#define CT_PROGRESS 8 
#define CT_HTML 9 
#define CT_STATIC_SKEW 10 
#define CT_ACTIVETEXT 11 
#define CT_TREE 12 
#define CT_STRUCTURED_TEXT 13 
#define CT_CONTEXT_MENU 14 
#define CT_CONTROLS_GROUP 15 
#define CT_3DSTATIC 20
#define CT_3DACTIVETEXT 21
#define CT_3DLISTBOX 22
#define CT_3DHTML 23
#define CT_3DSLIDER 24
#define CT_3DEDIT 25
#define CT_XKEYDESC 40 
#define CT_XBUTTON 41 
#define CT_XLISTBOX 42 
#define CT_XSLIDER 43 
#define CT_XCOMBO 44 
#define CT_ANIMATED_TEXTURE 45 
#define CT_OBJECT 80 
#define CT_OBJECT_ZOOM 81 
#define CT_OBJECT_CONTAINER 82 
#define CT_OBJECT_CONT_ANIM 83 
#define CT_LINEBREAK 98 
#define CT_USER 99 
#define CT_MAP 100 
#define CT_MAP_MAIN 101 

//-----------------------------------------------------------------------------
// Static styles 
#define ST_POS 0x0F 
#define ST_HPOS 0x03 
#define ST_VPOS 0x0C 

#define ST_LEFT 0x00 
#define ST_RIGHT 0x01 
#define ST_CENTER 0x02 
#define ST_DOWN 0x04 
#define ST_UP 0x08 

#define ST_VCENTER 0x0c 
#define ST_TYPE 0xF0 

#define ST_SINGLE 0 
#define ST_MULTI 16 
#define ST_TITLE_BAR 32 
#define ST_PICTURE 48 
#define ST_FRAME 64 
#define ST_BACKGROUND 80 
#define ST_GROUP_BOX 96 
#define ST_GROUP_BOX2 112 
#define ST_HUD_BACKGROUND 128 
#define ST_TILE_PICTURE 144 
#define ST_WITH_RECT 160 
#define ST_LINE 176 

//-----------------------------------------------------------------------------
// standard base dialog control class definitions
//-----------------------------------------------------------------------------
class RscText
{
 type = CT_STATIC;
 idc = -1;
 style = ST_LEFT;

 colorBackground[] = {Dlg_Color_Black,1};
 colorText[] = {Dlg_Color_White,1};
 font = FontM;

 sizeEx = Dlg_TEXTHGT;
 h = Dlg_CONTROLHGT;

 text = "";
};
//-------------------------------------
class RscFrame: RscText
{
 style = ST_FRAME;
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};
//-------------------------------------
class RscActiveText
{
 type = CT_ACTIVETEXT;
 idc = -1;
 style = ST_LEFT;

 color[] = {Dlg_Color_White,1};
 colorActive[] = {Dlg_Color_Red,1};
 font = FontM;

 sizeEx = Dlg_TEXTHGT;

 soundEnter[] = {"ui\ui_over", 0.2, 1};
 soundPush[] = {, 0.2, 1};
 soundClick[] = {"ui\ui_ok", 0.2, 1};
 soundEscape[] = {"ui\ui_cc", 0.2, 1};
 default = false;
};
//-------------------------------------
class RscButton
{
 type = CT_BUTTON;
 idc = -1;
 style = ST_CENTER;

 colorText[] = {Dlg_Color_White,1};
 colorDisabled[] = {Dlg_Color_Aqua,0.1};
 colorBackground[] = {Dlg_Color_Gray_2,1};
 colorBackgroundActive[] = {Dlg_Color_Yellow,0.4};
 colorBackgroundDisabled[] = {Dlg_Color_Red,0.1};
 colorFocused[] = {Dlg_Color_Black,1};
 colorShadow[] = {Dlg_Color_Pink,0.2};
 colorBorder[] = {Dlg_Color_White,0.2};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;

 offsetX = 0;
 offsetY = 0;
 offsetPressedX = 0;
 offsetPressedY = 0;
 borderSize = 0.001;
 soundEnter[] = {"ui\ui_ok", 0.2, 1};

 soundPush[] = {, 0.2, 1};
 soundClick[] = {"ui\ui_ok", 0.2, 1};
 soundEscape[] = {"ui\ui_cc", 0.2, 1};
 default = false;
 text = "";
 action = "";
};
//-------------------------------------
class RscEdit
{
 type = CT_EDIT;
 idc = -1;
 style = ST_LEFT;

 colorText[] = {Dlg_Color_Black,1};
 colorSelection[] = {Dlg_Color_Gray_5,1};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;

 autocomplete = false;
 text = "";
};
//-------------------------------------
class RscLB_LIST
{
 // type = defined in derived class
 idc = -1;
 style = ST_LEFT;

 color[] = {Dlg_Color_White,1};
 colorText[] = {Dlg_Color_White,1};
 colorSelect[] = {Dlg_Color_White,1};
 colorSelect2[] = {Dlg_Color_White,1};
 colorScrollbar[] = {Dlg_Color_White,1};
 colorBackground[] = {Dlg_Color_Gray_4,1};
 colorSelectBackground[] = {Dlg_Color_Gray_2,1};
 colorSelectBackground2[] = {Dlg_Color_Gray_4,0.75};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;
 h = Dlg_CONTROLHGT;
 rowHeight = Dlg_CONTROLHGT;

 soundSelect[] = {"ui\ui_cc", 0.2, 1}; // unchecked
 soundExpand[] = {"ui\ui_cc", 0.2, 1}; // unchecked
 soundCollapse[] = {"ui\ui_cc", 0.2, 1}; // unchecked
};
//-------------------------------------
class RscListBox: RscLB_LIST
{
 type = CT_LISTBOX;

 onLBSelChanged = "";
 onLBDblClick = "";
};
//-------------------------------------
class RscCombo: RscLB_LIST
{
 type = CT_COMBO;

 wholeHeight = 0.3;
};
//-------------------------------------
class RscObject
{
   type = CT_OBJECT;

   scale = 1.0;
   direction[] = {0, 0, 1};
   up[] = {0, 1, 0};
};
//-------------------------------------
class Rsc3DStatic
{
   type = CT_3DSTATIC;
   style = ST_LEFT;

   color[] = {Dlg_Color_Black,1};
   font = FontHTML;

   size = 0.04;

   selection = "display";
   angle = 0;
};
//-------------------------------------
class RscPicture
{
   type = CT_STATIC;
   idc = -1;
   style = ST_PICTURE;

   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {Dlg_Color_White, 1};
   font = Zeppelin32;

   sizeEx = Dlg_TEXTHGT;
 text = "";
};
//-------------------------------------
class RscHTML
{
 type = CT_HTML;
 idc = -1;
 style = ST_LEFT;

   colorText[] = {Dlg_Color_White, 1};
   colorLink[] = {0.05, 0.2, 0.05, 1};
   colorBold[] = {0, 1, 1, 1};
   colorBackground[] = {0, 0, 0, 0.5};
   colorLinkActive[] = {0, 0, 0.2, 1};
   colorPicture[] = {Dlg_Color_Black, 1};
   colorPictureLink[] = {Dlg_Color_Black, 1};
   colorPictureSelected[] = {Dlg_Color_Black, 1};
   colorPictureBorder[] = {Dlg_Color_Black, 1};

   prevPage = "\ca\ui\data\arrow_left_ca.paa";
   nextPage = "\ca\ui\data\arrow_right_ca.paa";
   filename = "";

   class HeadingStyle {
       font = "Zeppelin32";
       fontBold = "Zeppelin33";
       sizeEx = Dlg_TEXTHGT;
   };

   class H1: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.5;
   };

   class H2: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.4;
   };

   class H3: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.3;
   };

   class H4: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.2;
   };

   class H5: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.1;
   };

   class H6: HeadingStyle {
       sizeEx = Dlg_TEXTHGT;
   };

   class P: HeadingStyle {
       sizeEx = Dlg_TEXTHGT;
   };
};
//-------------------------------------
class RscMapControl 
{
 type = CT_MAP_MAIN;
 idc = -1;
 style = ST_PICTURE;

 colorSea[] = {0.56, 0.8, 0.98, 0.5};
   colorForest[] = {0.6, 0.8, 0.2, 0.5};
   colorRocks[] = {0.6, 0.45, 0.27, 0.4};
   colorCountlines[] = {0.7, 0.55, 0.3, 0.6};
   colorCountlinesWater[] = {0, 0.53, 1, 0.5};
 colorMainCountlines[] = {0.65, 0.45, 0.27, 1};
 colorMainCountlinesWater[] = {0, 0.53, 1, 1};
 colorPowerLines[] = {Dlg_Color_Black, 1};
 colorLevels[] = {Dlg_Color_Black, 1};
   colorForestBorder[] = {0.4, 0.8, 0, 1};
   colorRocksBorder[] = {0.6, 0.45, 0.27, 0.4};
   colorNames[] = {Dlg_Color_Black, 1};
   colorInactive[] = {Dlg_Color_White, 0.5};
 colorBackground[] = {Dlg_Color_White, 1};
 colorText[] = {Dlg_Color_White, 1};

 font = "Zeppelin32";
 sizeEx = 0.05;

 fontLabel = "Zeppelin32";
   sizeExLabel = 0.0286458;
   fontGrid = "Zeppelin32";
   sizeExGrid = 0.0286458;
   fontUnits = "Zeppelin32";
   sizeExUnits = 0.0286458;
   fontNames = "Zeppelin32";
   sizeExNames = 0.0286458;
   fontInfo = "Zeppelin32";
   sizeExInfo = 0.0286458;
   fontLevel = "Zeppelin32";
   sizeExLevel = 0.0286458;

 ptsPerSquareSea    = 6;
 ptsPerSquareTxt    = 8;
 ptsPerSquareCLn    = 8;
 ptsPerSquareExp    = 8;
 ptsPerSquareCost = 8;
 ptsPerSquareFor = "4.0f";
 ptsPerSquareForEdge = "10.0f";
 ptsPerSquareRoad = 2;
 ptsPerSquareObj = 10;

   text = "\ca\ui\data\map_background2_co.paa";
 x = 0.1;
 y = 0.1;
 w = 0.3;
 h = 0.3;
 ShowCountourInterval = 0;
 scaleDefault = 0.1;
 onMouseButtonClick = "";
 onMouseButtonDblClick = "";

 class ActiveMarker {
   color[] = {0.3, 0.1, 0.9, 1};
   size    = 50;
 };

   class Legend {
       x = 0.729;
       y = 0.05;
       w = 0.237;
       h = 0.127;
       font = "Zeppelin32";
       sizeEx = 0.0208333;
       colorBackground[] = {0.906, 0.901, 0.88, 0.8};
       color[] = {Dlg_Color_Black, 1};
   };

   class Bunker {
   color[] = {0, 0.35, 0.7, 1};
       icon = "\ca\ui\data\map_bunker_ca.paa";
       size = 14;
       importance = 1.5 * 14 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Bush {
       icon = "\ca\ui\data\map_bush_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 14;
       importance = 0.2 * 14 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class BusStop {
       icon = "\ca\ui\data\map_busstop_ca.paa";
       color[] = {0, 0, 1, 1};
       size = 10;
       importance = 1 * 10 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Command {
       icon = "#(argb,8,8,3)color(1,1,1,1)";
       color[] = {0, 0.9, 0, 1};
       size = 18;
       importance = 1;
       coefMin = 1;
       coefMax = 1;
   };

   class Cross {
   color[] = {0, 0.35, 0.7, 1};
       icon = "\ca\ui\data\map_cross_ca.paa";
       size = 16;
       importance = 0.7 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Fortress {
       icon = "\ca\ui\data\map_bunker_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Fuelstation {
       icon = "\ca\ui\data\map_fuelstation_ca.paa";
   color[] = {1.0, 0.35, 0.35, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.75;
       coefMax = 4;
   };

   class Fountain {
       icon = "\ca\ui\data\map_fountain_ca.paa";
       color[] = {0, 0.35, 0.7, 1};
       size = 12;
       importance = 1 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Hospital {
       icon = "\ca\ui\data\map_hospital_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Chapel {
       icon = "\ca\ui\data\map_chapel_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 1 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Church {
       icon = "\ca\ui\data\map_church_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Lighthouse {
       icon = "\ca\ui\data\map_lighthouse_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 20;
       importance = 3 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Quay {
       icon = "\ca\ui\data\map_quay_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Rock {
   color[] = {0.35, 0.35, 0.35, 1};
       icon = "\ca\ui\data\map_rock_ca.paa";
       size = 12;
       importance = 0.5 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Ruin {
       icon = "\ca\ui\data\map_ruin_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 1.2 * 16 * 0.05;
       coefMin = 1;
       coefMax = 4;
   };

   class SmallTree {
       icon = "\ca\ui\data\map_smalltree_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 12;
       importance = 0.6 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Stack {
       icon = "\ca\ui\data\map_stack_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 20;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Tree {
       icon = "\ca\ui\data\map_tree_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 12;
       importance = 0.9 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Tourism {
       icon = "\ca\ui\data\map_tourism_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 1 * 16 * 0.05;
       coefMin = 0.7;
       coefMax = 4;
   };

   class Transmitter {
       icon = "\ca\ui\data\map_transmitter_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 20;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class ViewTower {
       icon = "\ca\ui\data\map_viewtower_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2.5 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Watertower {
       icon = "\ca\ui\data\map_watertower_ca.paa";
       color[] = {0, 0.35, 0.7, 1};
       size = 32;
       importance = 1.2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Waypoint {
       icon = "\ca\ui\data\map_waypoint_ca.paa";
     color[] = {0, 0.35, 0.7, 1};
     size = 32;
     coefMin = 1.00;
     coefMax = 1.00;
     importance = 1.00;
   };

   class WaypointCompleted {
       icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
     color[] = {Dlg_Color_Black, 1};
     size = 24;
     importance = 1.00;
     coefMin = 1.00;
     coefMax = 1.00;
   };
};
//-------------------------------------
class RscMap 
{
   access = ReadAndWrite;

   class controls {
       class Map : RscMapControl {
           moveOnEdges = 0;
           x = 0;
           y = 0;
           w = 0.83;
           h = 1;
       };
   };
};

//=============================================================================
// Some common class definitions - most dialogs need a background
class Dlg_FullBackground: RscText
{
 colorBackground[] = {Dlg_Color_Gray_3,1};
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};
//-------------------------------------
class Dlg_FullBackgroundFrame: RscFrame
{
 text = " Selection Dialog ";
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};

What you should have so far

1. You should have a folder that is titled Dialogs,

inside that folder you should have 2 scripts named:

Respawn_Dialog.hpp

Respawn_Dialog.sqf

2. You should have a folder that is titled Common which is inside the Dialogs folder.

The Common folder should have 2 scripts inside it and they are:

DialogColorConstants.hpp

DialogControlClasses.hpp

=====================

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Dialogs with 2 scripts, and inside the Dialogs folder you should have another

folder named common with 2 scripts inside that.

=========

Step B

In this next step we will need to create another folder and other scripts, follow the steps below:

1. Create a folder and name it Scripts

inside this folder we need to create a script, so create a script and name it:

respawn_player.sqf

inside this script add this code:

// Desc: A respawn control script

for [{}, {true}, {true}] do
{
 //waitUntil { !(alive player) };
 while { alive player } do { sleep 1.0 };

 nul=[] execVM "Dialogs\Respawn_Dialog.sqf";

 // wait for respawn countdown to finish and for the selection to be made from the dialog
 // (Upon auto respawning after countdown, you will respawn at "RespawnWest" marker.)
 //waitUntil { alive player && !dialog };
 while { !alive player || dialog } do { sleep 1.0 };

 // player spawned at "RespawnWest" marker initially, so move him to final selected spawn location
 player setPos getMarkerPos RespawnLocation;
};

Lets recap:

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Scripts with 1 script inside named respawn_player.sqf

=========

Step C

in this next step we will need to create 2 scripts, follow the steps below:

1. Create a script and name it description.ext

inside the description.ext script put the following codes:

class Header 
{
 gameType=Coop;
 minPlayers=1;
 maxPlayers=5;
};

#include "Dialogs\Common\DialogColorConstants.hpp"
#include "Dialogs\Common\DialogControlClasses.hpp"

#include "Dialogs\Respawn_Dialog.hpp"

Respawn = "BASE";
RespawnDelay = 3;
RespawnDialog = false; // hide spawn countdown dialog

2. Create a script and name it init.sqf

inside the init.sqf put the following code:

RespawnLocation = "m_Start"; // marker name, init start location
player setPos getMarkerPos RespawnLocation;

//player addeventhandler ["Killed", {_this execVM "scripts\respawn_player.sqf"}]; // would rather use event handler
player execVM "scripts\respawn_player.sqf"; // infinite loop, controls respawning

Lets recap:

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Scripts with 1 script inside named respawn_player.sqf

============

Step D

Overview

Overall Folders and scripts what you should have in your missions folder

Folders

[/b] Dialogs,

inside you should have 2 scripts named:

Respawn_Dialog.hpp

Respawn_Dialog.sqf

Inside the Dialogs folder above you should have a folder named

Common

The Common folder should have 2 scripts inside it and they are:

DialogColorConstants.hpp

DialogControlClasses.hpp

Inside the mission folder is:

Scripts folder with 1 script inside named respawn_player.sqf

Dialogs -(folder)

Scripts - (folder)

description.ext

init.sqf

mission.sqm - (mission you created in the editor)

Step E - Editor

Start the game and open your mission in the editor, and follow the steps below:

1. Put down a player, if the mission is a coop then put more units down and make them playable.

Move the units far away from where you want to start, where its isolated.

2. Create a marker (solid) and name it respawn_west

move the marker to the same spot as the units you created, so the units are in the marker area.

Base Marker

3. Create a marker and name it base, under text put start spawn

place this marker at the base where you plan to start your mission.

4. Create a marker and name it m_Start

This is the spawn point like above where you will start, so where ever this marker is at you will start there when the missions starts.

2nd Respawn Marker

5. Create a marker and name it spawn2, under text put spawn2

5a. Create a marker and name it m_WestSpawn2

3rd Respawn Marker

6. Create a marker and name it spawn3, under text put spawn3

6a. Create a marker and name it m_WestSpawn3

=============

Repeat the markers above for 5 markers, if you need more then 5 markers for respawn then you have to define it in the

Respawn_Dialog.sqf which is in the Dialogs folder.

============

Thats basically it.

So when you start you will spawn at the marker m_Start

when you die a menu will popup with a map, choose from the list which spawn you want,

if you click on a spawn the map will zoom there, if you choose that spot then hit ok at the bottom and you will spawn there.

note that there is an error message that will popup randomly which I have no idea on fixing but its random and rare.

Edited by Gnter Severloh

Share this post


Link to post
Share on other sites
Ok. This menu respawn can be tricky but heres what you need to do:

Menu Dialog - Menu respawn

Download the demo mission

http://dl.dropbox.com/u/42601124/Respawn%20dialog-menu%20respawn.zip

put the folder into mpmissions folder for the editor, then host the mission and see it in the editor,

also host it to play it as respawn dont work in SP.

=============

You will need to create some folders and a few scripts, just follow the steps:

Step A

Folders

1. create a folder and name it Dialogs

2. create a folder and name it Scripts

Dialogs Folder

1. Inside this folder create a folder and name it Common

Scripts inside Dialogs folder:

1. Create a script and name it Respawn_Dialog.hpp

then put the following code inside the script:

// Desc: A respawn selection dialog
// By: Dr Eyeball
// Version: 1.0 (May 2007)
//-----------------------------------------------------------------------------
// SPWN_ is the unique prefix associated with all unique classes for this dialog.

//-----------------------------------------------------------------------------
// IDD's & IDC's
//-----------------------------------------------------------------------------
#define SPWN_IDD_RespawnDialog 389

#define SPWN_IDC_RespawnList 891
#define SPWN_IDC_RespawnMap 892
#define SPWN_IDC_AcceptButton 893
#define SPWN_IDC_Countdown 894

//-----------------------------------------------------------------------------
// Personalisation - Custom modifications to the standard control classes
//-----------------------------------------------------------------------------

class SPWN_Button: RscButton
{
 x = 1*Dlg_COLWIDTH;
 y = 0.1;
 w = 0.1;
 h = Dlg_CONTROLHGT;
};

class SPWN_BaselineButton: SPWN_Button
{
 w = 0.15;
 y = 1.0-Dlg_CONTROLHGT; // last row
};

class SPWN_CaptionText: RscText
{
};

//-----------------------------------------------------------------------------
// Main dialog
//-----------------------------------------------------------------------------
class SPWN_RespawnDialog
{
 idd = SPWN_IDD_RespawnDialog;

 movingEnable = true;
 controlsBackground[] = { SPWN_Background, SPWN_Frame };

 class SPWN_Background: Dlg_FullBackground
 {
   colorBackground[] = {Dlg_Color_Gray_3, 0.7};
 };

 class SPWN_Frame: Dlg_FullBackgroundFrame
 {
   text = " Respawn Location Selection ";
 };

 //---------------------------------------------
 objects[] = 
 { 
 };

 controls[] = 
 {
   SPWN_RespawnListCaption,
   SPWN_RespawnList,

   SPWN_RespawnMapCaption,
   SPWN_RespawnMap,

   SPWN_AcceptButton
 };
 //---------------------------------------------
 // captions
 class SPWN_RespawnListCaption: SPWN_CaptionText
 {
   idc = SPWN_IDC_Countdown;
   x = 0.01;
   y = 0.03;
   w = 0.51;
   text = "Respawn Locations";
 };
 class SPWN_RespawnMapCaption: SPWN_CaptionText
 {
   x = 0.01;
   y = 0.32;
   w = 0.51;
   text = "Respawn Locations Map";
 };
 //---------------------------------------------
 // Controls
 class SPWN_RespawnList: RscListBox
 { 
   idc = SPWN_IDC_RespawnList;
   x = 0.01;
   y = 0.07;
   w = 0.51;
   h = 0.2;

   onLBSelChanged = "[_this] call SPWN_ViewSpawnPoint";
   onLBDblClick = "[_this] call SPWN_AcceptButton";
 };
 class SPWN_RespawnMap: RscMapControl
 {
   idc = SPWN_IDC_RespawnMap; 
   x = 0.01;
   y = 0.36;
     w    = 0.51;
     h    = 0.6; 
 };
 //---------------------------------------------
 // buttons
 class SPWN_AcceptButton: SPWN_BaselineButton
 {
     idc = SPWN_IDC_AcceptButton;
     x = 5*Dlg_COLWIDTH;
     text = "Ok";
     action = "[] call SPWN_AcceptButton";
 };
 //---------------------------------------------
};

2. Create a script and name it Respawn_Dialog.sqf (note its a sqf this time)

then put the following code inside the script:

// Desc: A respawn selection dialog
// By: Dr Eyeball
// Version: 1.0 (May 2007)
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
// The following IDD & IDC variables should match their equivalents for the dialog (from "Dialogs\RespawnDialog.hpp")
SPWN_IDD_RespawnDialog = 389;

SPWN_IDC_RespawnList = 891;
SPWN_IDC_RespawnMap = 892;
SPWN_IDC_AcceptButton = 893;
SPWN_IDC_Countdown = 894;

SPWN_RespawnLocationsCaption = "Respawn Locations";

//-----------------------------------------------------------------------------
// Control functions
//-----------------------------------------------------------------------------
SPWN_FillComboList = 
{
 _idc2 = _this select 0;
 _DualList = _this select 1;

 _control = SPWN_display displayCtrl _idc2;

 lbClear _idc2;
 {
   _Item = _x select 0;
   _Data = _x select 1;
   _index = lbAdd [_idc2, _Item];
   lbSetData [_idc2, _index, _Data];
 } forEach _DualList;

 lbSetCurSel [_idc2, 0];
};
//-----------------------------------------------------------------------------
// Respawn Selection functions
//-----------------------------------------------------------------------------

//----------------------
SPWN_ViewSpawnPoint =
{
 _selection = _this select 0;  

 _control = _selection select 0;
 _selectedIndex = _selection select 1; 

 _basePos = getPos player;
 _spawnMarkerName = _control lbData _selectedIndex;
 _spawnPos = getmarkerpos _spawnMarkerName; 

 //RespawnLocation = _spawnMarkerName; // interferes

 //---- show map location using panning & zooming
 _ctrl = SPWN_display displayctrl SPWN_IDC_RespawnMap;
 ctrlMapAnimClear _ctrl; // reset while scrolling list

 _ctrl ctrlmapanimadd [0.1, 0.30, _basePos]; // show home base
 ctrlmapanimcommit _ctrl;

 _ctrl ctrlmapanimadd [0.8, 0.90, _spawnPos]; // show map location
 ctrlmapanimcommit _ctrl;

 _ctrl ctrlmapanimadd [0.1, 0.20, _spawnPos]; // zoom map location
 ctrlmapanimcommit _ctrl;
};
//----------------------
SPWN_AcceptButton =
{
 _selectedIndex = lbCurSel SPWN_IDC_RespawnList;

 RespawnLocation = lbData [sPWN_IDC_RespawnList, _selectedIndex]; // assign marker name to global var

 player globalChat format["Spawn location %1 selected. Marker name='%2'", 
   _selectedIndex, lbData [sPWN_IDC_RespawnList, _selectedIndex] ]; // debug

 closeDialog 0;
};
//----------------------
SPWN_Start =
{
 _Params = _this;

 _MyDualList =
 [ // [spawn description, marker name]
   ["1 - Base", "m_Start"],
   ["2 - Spawn2", "m_WestSpawn2"],
   ["3 - Spawn3", "m_WestSpawn3"],
   ["4 - Spawn4", "m_WestSpawn4"],
   ["5 - Spawn5", "m_WestSpawn5"]
 ];

 [sPWN_IDC_RespawnList, _MyDualList] call SPWN_FillComboList;
 //---------------------
 // find & focus current respawn location marker
 _MatchingIndex = 0;
 _Size = lbSize SPWN_IDC_RespawnList;
 for [{_i = 0}, {_i < _Size}, {_i = _i + 1}] do
 {
   if (RespawnLocation == lbData [sPWN_IDC_RespawnList, _i]) then 
   {
     _MatchingIndex = _i;
   };
 };

 lbSetCurSel [sPWN_IDC_RespawnList, _MatchingIndex];
};
//-----------------------------------------------------------------------------
// Init
//-----------------------------------------------------------------------------

_ok = createDialog "SPWN_RespawnDialog";
if !(_ok) exitWith { hint "createDialog failed" };

SPWN_display = findDisplay SPWN_IDD_RespawnDialog; 

_Params = _this;
[_Params] call SPWN_Start;

// show the countdown time
while { dialog && playerRespawnTime > -1 } do
{
 _timeRemaining = format["%1 - %2 seconds", SPWN_RespawnLocationsCaption, playerRespawnTime];
 ctrlSetText [sPWN_IDC_Countdown, _timeRemaining];
 sleep 1.0;
};
ctrlSetText [sPWN_IDC_Countdown, SPWN_RespawnLocationsCaption];

Common Folder

1. create a script and name it DialogColorConstants.hpp

then put the following code inside the script:

// Desc: A large selection of #define color constants.
// By: Dr Eyeball
// Version: 0.01 alpha (May 2007)

//-----------------------------------------------------------------------------
// Color Scheme - constants
//-----------------------------------------------------------------------------
#define Dlg_ColorScheme_DialogBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_DialogText Dlg_Color_white

#define Dlg_ColorScheme_ControlBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_ControlText Dlg_Color_white

#define Dlg_ColorScheme_ButtonBackground Dlg_Color_Gray_10
#define Dlg_ColorScheme_ButtonText Dlg_Color_white

#define Dlg_ColorScheme_HighlightBackground Dlg_Color_paleBlue2
#define Dlg_ColorScheme_HighlightText Dlg_Color_white

//-----------------------------------------------------------------------------
// Color attributes
//-----------------------------------------------------------------------------

#define Dlg_ColorAttribute_Clear {0, 0, 0, 0}

//-----------------------------------------------------------------------------
// Main base colors
//-----------------------------------------------------------------------------

#define Dlg_Color_Black 0,0,0
#define Dlg_Color_White 1,1,1

// additive primaries
#define Dlg_Color_Red 1,0,0
#define Dlg_Color_Lime 0,1,0
#define Dlg_Color_Blue 0,0,1

// subtractive primaries
#define Dlg_Color_Yellow 1,1,0
#define Dlg_Color_Fuchsia 1,0,1 // Dlg_Color_Magenta
#define Dlg_Color_Aqua 0,1,1 // Dlg_Color_Cyan

// shades
#define Dlg_Color_Maroon 0.5,0,0
#define Dlg_Color_Green 0,0.5,0
#define Dlg_Color_Navy 0,0,0.5

#define Dlg_Color_Olive 0.5,0.5,0
#define Dlg_Color_Purple 0.5,0,0.5
#define Dlg_Color_Teal 0,0.5,0.5

// grays
#define Dlg_Color_Gray 0.5,0.5,0.5 // Dlg_Color_DkGray
#define Dlg_Color_Silver 0.75,0.75,0.75 // Dlg_Color_LtGray
#define Dlg_Color_LtGray 0.75,0.75,0.75 // Dlg_Color_Silver
#define Dlg_Color_DkGray 0.5,0.5,0.5 // Dlg_Color_Gray

// 0.1 is darkest (near black) 0.9 is lightest (near white)
#define Dlg_Color_Gray_1 0.1,0.1,0.1
#define Dlg_Color_Gray_2 0.2,0.2,0.2
#define Dlg_Color_Gray_3 0.3,0.3,0.3
#define Dlg_Color_Gray_4 0.4,0.4,0.4
#define Dlg_Color_Gray_5 0.5,0.5,0.5
#define Dlg_Color_Gray_6 0.6,0.6,0.6
#define Dlg_Color_Gray_7 0.7,0.7,0.7
#define Dlg_Color_Gray_8 0.8,0.8,0.8
#define Dlg_Color_Gray_9 0.9,0.9,0.9

//-----------------------------------------------------------------------------
// Extended colors - based on 'html'/'web' colors
//-----------------------------------------------------------------------------
#define Dlg_Color_AliceBlue 0.937500,0.968750,1.000000
#define Dlg_Color_AntiqueWhite 0.976563,0.917969,0.839844
#define Dlg_Color_Aquamarine 0.496094,1.000000,0.828125
#define Dlg_Color_Azure 0.937500,1.000000,1.000000
#define Dlg_Color_Beige 0.957031,0.957031,0.859375
#define Dlg_Color_Bisque 1.000000,0.890625,0.765625
//#define Dlg_Color_Black 0.000000,0.000000,0.000000
#define Dlg_Color_BlanchedAlmond 1.000000,0.917969,0.800781
//#define Dlg_Color_Blue 0.000000,0.000000,1.000000
#define Dlg_Color_BlueViolet 0.539063,0.167969,0.882813
#define Dlg_Color_Brown 0.644531,0.164063,0.164063
#define Dlg_Color_Burlywood 0.867188,0.718750,0.527344
#define Dlg_Color_CadetBlue 0.371094,0.617188,0.625000
#define Dlg_Color_Chartreuse 0.496094,1.000000,0.000000
#define Dlg_Color_Chocolate 0.820313,0.410156,0.117188
#define Dlg_Color_Coral 1.000000,0.496094,0.312500
#define Dlg_Color_CornFlowerBlue 0.390625,0.582031,0.925781
#define Dlg_Color_CornSilk 1.000000,0.968750,0.859375
#define Dlg_Color_Crimson 0.859375,0.078125,0.234375
#define Dlg_Color_Cyan 0.000000,1.000000,1.000000 // Dlg_Color_Aqua
#define Dlg_Color_DarkBlue 0.000000,0.000000,0.542969
#define Dlg_Color_DarkCyan 0.000000,0.542969,0.542969
#define Dlg_Color_DarkGoldenRod 0.718750,0.523438,0.042969
#define Dlg_Color_DarkGray 0.660156,0.660156,0.660156
#define Dlg_Color_Darkgreen 0.000000,0.390625,0.000000
#define Dlg_Color_DarkKhaki 0.738281,0.714844,0.417969
#define Dlg_Color_DarkMagenta 0.542969,0.000000,0.542969
#define Dlg_Color_DarkOliveGreen 0.332031,0.417969,0.183594
#define Dlg_Color_DarkOrange 1.000000,0.546875,0.000000
#define Dlg_Color_DarkOrchid 0.597656,0.195313,0.796875
#define Dlg_Color_DarkRed 0.542969,0.000000,0.000000
#define Dlg_Color_DarkSalmon 0.910156,0.585938,0.476563
#define Dlg_Color_DarkSeaGreen 0.558594,0.734375,0.558594
#define Dlg_Color_DarkSlateBlue 0.281250,0.238281,0.542969
#define Dlg_Color_DarkSlategray 0.183594,0.308594,0.308594
#define Dlg_Color_DarkTurquoise 0.000000,0.804688,0.816406
#define Dlg_Color_DarkViolet 0.578125,0.000000,0.824219
#define Dlg_Color_DeepPink 1.000000,0.078125,0.574219
#define Dlg_Color_DeepskyBlue 0.000000,0.746094,1.000000
#define Dlg_Color_DimGray 0.410156,0.410156,0.410156
#define Dlg_Color_DodgerBlue 0.117188,0.562500,1.000000
#define Dlg_Color_Firebrick 0.695313,0.132813,0.132813
#define Dlg_Color_FloralWhite 1.000000,0.976563,0.937500
#define Dlg_Color_ForestGreen 0.132813,0.542969,0.132813
#define Dlg_Color_Gainsboro 0.859375,0.859375,0.859375
#define Dlg_Color_GhostWhite 0.968750,0.968750,1.000000
#define Dlg_Color_Gold 1.000000,0.839844,0.000000
#define Dlg_Color_GoldenRod 0.851563,0.644531,0.125000
//#define Dlg_Color_Gray 0.500000,0.500000,0.500000
//#define Dlg_Color_Green 0.000000,0.500000,0.000000
#define Dlg_Color_GreenYellow 0.675781,1.000000,0.183594
#define Dlg_Color_Honeydew 0.937500,1.000000,0.937500
#define Dlg_Color_HotPink 1.000000,0.410156,0.703125
#define Dlg_Color_IndianRed 0.800781,0.359375,0.359375
#define Dlg_Color_Indigo 0.292969,0.000000,0.507813
#define Dlg_Color_Ivory 1.000000,1.000000,0.937500
#define Dlg_Color_Khaki 0.937500,0.898438,0.546875
#define Dlg_Color_Lavender 0.898438,0.898438,0.976563
#define Dlg_Color_LavenderBlush 1.000000,0.937500,0.957031
#define Dlg_Color_LawnGreen 0.484375,0.984375,0.000000
#define Dlg_Color_LemonChiffon 1.000000,0.976563,0.800781
#define Dlg_Color_LightBlue 0.675781,0.843750,0.898438
#define Dlg_Color_LightCoral 0.937500,0.500000,0.500000
#define Dlg_Color_LightCyan 0.875000,1.000000,1.000000
#define Dlg_Color_LightGoldenrodYellow 0.976563,0.976563,0.820313
#define Dlg_Color_LightGreen 0.562500,0.929688,0.562500
#define Dlg_Color_Lightgrey 0.824219,0.824219,0.824219
#define Dlg_Color_LightPink 1.000000,0.710938,0.753906
#define Dlg_Color_LightSalmon 1.000000,0.625000,0.476563
#define Dlg_Color_LightSeaGreen 0.125000,0.695313,0.664063
#define Dlg_Color_LightSkyBlue 0.527344,0.804688,0.976563
#define Dlg_Color_LightSlateGray 0.464844,0.531250,0.597656
#define Dlg_Color_LightSteelBlue 0.687500,0.765625,0.867188
#define Dlg_Color_LightYellow 1.000000,1.000000,0.875000
//#define Dlg_Color_Lime 0.000000,1.000000,0.000000
#define Dlg_Color_LimeGreen 0.195313,0.800781,0.195313
#define Dlg_Color_Linen 0.976563,0.937500,0.898438
#define Dlg_Color_Magenta 1.000000,0.000000,1.000000
//#define Dlg_Color_Maroon 0.500000,0.000000,0.000000
#define Dlg_Color_MediumAquamarine 0.398438,0.800781,0.664063
#define Dlg_Color_MediumBlue 0.000000,0.000000,0.800781
#define Dlg_Color_MediumOrchid 0.726563,0.332031,0.824219
#define Dlg_Color_MediumPurple 0.574219,0.437500,0.855469
#define Dlg_Color_MediumSeaGreen 0.234375,0.699219,0.441406
#define Dlg_Color_MediumSlateBlue 0.480469,0.406250,0.929688
#define Dlg_Color_MediumSpringGreen 0.000000,0.976563,0.601563
#define Dlg_Color_MediumTurquoise 0.281250,0.816406,0.796875
#define Dlg_Color_MediumVioletRed 0.777344,0.082031,0.519531
#define Dlg_Color_MidnightBlue 0.097656,0.097656,0.437500
#define Dlg_Color_Mintcream 0.957031,1.000000,0.976563
#define Dlg_Color_MistyRose 1.000000,0.890625,0.878906
#define Dlg_Color_Moccasin 1.000000,0.890625,0.707031
#define Dlg_Color_NavajoWhite 1.000000,0.867188,0.675781
//#define Dlg_Color_Navy 0.000000,0.000000,0.500000
#define Dlg_Color_OldLace 0.988281,0.957031,0.898438
//#define Dlg_Color_Olive 0.500000,0.500000,0.000000
#define Dlg_Color_OliveDrab 0.417969,0.554688,0.136719
#define Dlg_Color_Orange 1.000000,0.644531,0.000000
#define Dlg_Color_OrangeRed 1.000000,0.269531,0.000000
#define Dlg_Color_Orchid 0.851563,0.437500,0.835938
#define Dlg_Color_PaleGoldenrod 0.929688,0.906250,0.664063
#define Dlg_Color_PaleGreen 0.593750,0.980469,0.593750
#define Dlg_Color_PaleTurquoise 0.683594,0.929688,0.929688
#define Dlg_Color_PaleVioletRed 0.855469,0.437500,0.574219
#define Dlg_Color_PapayaWhip 1.000000,0.933594,0.832031
#define Dlg_Color_PeachPuff 1.000000,0.851563,0.722656
#define Dlg_Color_Peru 0.800781,0.519531,0.246094
#define Dlg_Color_Pink 1.000000,0.750000,0.792969
#define Dlg_Color_Plum 0.863281,0.625000,0.863281
#define Dlg_Color_PowderBlue 0.687500,0.875000,0.898438
//#define Dlg_Color_Purple 0.500000,0.000000,0.500000
//#define Dlg_Color_Red 1.000000,0.000000,0.000000
#define Dlg_Color_RosyBrown 0.734375,0.558594,0.558594
#define Dlg_Color_RoyalBlue 0.253906,0.410156,0.878906
#define Dlg_Color_SaddleBrown 0.542969,0.269531,0.074219
#define Dlg_Color_Salmon 0.976563,0.500000,0.445313
#define Dlg_Color_SandyBrown 0.953125,0.640625,0.375000
#define Dlg_Color_SeaGreen 0.179688,0.542969,0.339844
#define Dlg_Color_Seashell 1.000000,0.957031,0.929688
#define Dlg_Color_Sienna 0.625000,0.320313,0.175781
//#define Dlg_Color_Silver 0.750000,0.750000,0.750000
#define Dlg_Color_SkyBlue 0.527344,0.804688,0.917969
#define Dlg_Color_SlateBlue 0.414063,0.351563,0.800781
#define Dlg_Color_SlateGray 0.437500,0.500000,0.562500
#define Dlg_Color_Snow 1.000000,0.976563,0.976563
#define Dlg_Color_SpringGreen 0.000000,1.000000,0.496094
#define Dlg_Color_SteelBlue 0.273438,0.507813,0.703125
#define Dlg_Color_Tan 0.820313,0.703125,0.546875
//#define Dlg_Color_Teal 0.000000,0.500000,0.500000
#define Dlg_Color_Thistle 0.843750,0.746094,0.843750
#define Dlg_Color_Tomato 1.000000,0.386719,0.277344
#define Dlg_Color_Turquoise 0.250000,0.875000,0.812500
#define Dlg_Color_Violet 0.929688,0.507813,0.929688
#define Dlg_Color_Wheat 0.957031,0.867188,0.699219
//#define Dlg_Color_White 1.000000,1.000000,1.000000
#define Dlg_Color_WhiteSmoke 0.957031,0.957031,0.957031
//#define Dlg_Color_Yellow 1.000000,1.000000,0.000000
#define Dlg_Color_YellowGreen 0.601563,0.800781,0.195313

//-----------------------------------------------------------------------------
// Extended colors - a few odd pastel colors
//-----------------------------------------------------------------------------
#define Dlg_Color_MoneyGreen 0.75,0.859375,0.75
//#define Dlg_Color_SkyBlue 0.6484375,0.7890625,0.9375
#define Dlg_Color_Cream 1,0.98046875,0.9375
#define Dlg_Color_MedGray 0.625,0.625,0.640625

2. create a script and name it DialogControlClasses.hpp

then put the following code inside the script:

// Desc: The top section contains the standard dialog #define constants, used for 
// controls, styles & fonts. The bottom section contains the standard base dialog 
// control class definitions, from which you can inherit.
//
// Notes: There are many slightly different versions of this file around.
// By: public code taken from various sources: BIS pbo's, tutorials, WIKI & other scripts
// Colors and coeff's referenced from quickmap.hpp, by mi2slow & Vienna.
//
// Version: 0.01 alpha (May 2007, Dr Eyeball)
//-----------------------------------------------------------------------------

// Constants to standardize and help simplify positioning and sizing
#define Dlg_ROWS 36 // determines default text and control height
#define Dlg_COLS 90 // guide for positioning controls

// (Calculate proportion, then /100 to represent as percentage)
#define Dlg_CONTROLHGT ((100/Dlg_ROWS)/100)
#define Dlg_COLWIDTH ((100/Dlg_COLS)/100)

#define Dlg_ROWHGT_MOD 1.0
#define Dlg_TEXTHGT_MOD 1.3
#define Dlg_ROWSPACING 0.01

#define Dlg_ROWHGT (Dlg_CONTROLHGT/Dlg_ROWHGT_MOD)
#define Dlg_TEXTHGT (Dlg_ROWHGT/Dlg_TEXTHGT_MOD)

//-----------------------------------------------------------------------------
// Fonts
#define FontM "TahomaB"
#define FontHTML "TahomaB"
//"CourierNewB64" "TahomaB" "Bitstream" "Zeppelin32"

//-----------------------------------------------------------------------------
// Control Types 
#define CT_STATIC 0 
#define CT_BUTTON 1 
#define CT_EDIT 2 
#define CT_SLIDER 3 
#define CT_COMBO 4 
#define CT_LISTBOX 5 
#define CT_TOOLBOX 6 
#define CT_CHECKBOXES 7 
#define CT_PROGRESS 8 
#define CT_HTML 9 
#define CT_STATIC_SKEW 10 
#define CT_ACTIVETEXT 11 
#define CT_TREE 12 
#define CT_STRUCTURED_TEXT 13 
#define CT_CONTEXT_MENU 14 
#define CT_CONTROLS_GROUP 15 
#define CT_3DSTATIC 20
#define CT_3DACTIVETEXT 21
#define CT_3DLISTBOX 22
#define CT_3DHTML 23
#define CT_3DSLIDER 24
#define CT_3DEDIT 25
#define CT_XKEYDESC 40 
#define CT_XBUTTON 41 
#define CT_XLISTBOX 42 
#define CT_XSLIDER 43 
#define CT_XCOMBO 44 
#define CT_ANIMATED_TEXTURE 45 
#define CT_OBJECT 80 
#define CT_OBJECT_ZOOM 81 
#define CT_OBJECT_CONTAINER 82 
#define CT_OBJECT_CONT_ANIM 83 
#define CT_LINEBREAK 98 
#define CT_USER 99 
#define CT_MAP 100 
#define CT_MAP_MAIN 101 

//-----------------------------------------------------------------------------
// Static styles 
#define ST_POS 0x0F 
#define ST_HPOS 0x03 
#define ST_VPOS 0x0C 

#define ST_LEFT 0x00 
#define ST_RIGHT 0x01 
#define ST_CENTER 0x02 
#define ST_DOWN 0x04 
#define ST_UP 0x08 

#define ST_VCENTER 0x0c 
#define ST_TYPE 0xF0 

#define ST_SINGLE 0 
#define ST_MULTI 16 
#define ST_TITLE_BAR 32 
#define ST_PICTURE 48 
#define ST_FRAME 64 
#define ST_BACKGROUND 80 
#define ST_GROUP_BOX 96 
#define ST_GROUP_BOX2 112 
#define ST_HUD_BACKGROUND 128 
#define ST_TILE_PICTURE 144 
#define ST_WITH_RECT 160 
#define ST_LINE 176 

//-----------------------------------------------------------------------------
// standard base dialog control class definitions
//-----------------------------------------------------------------------------
class RscText
{
 type = CT_STATIC;
 idc = -1;
 style = ST_LEFT;

 colorBackground[] = {Dlg_Color_Black,1};
 colorText[] = {Dlg_Color_White,1};
 font = FontM;

 sizeEx = Dlg_TEXTHGT;
 h = Dlg_CONTROLHGT;

 text = "";
};
//-------------------------------------
class RscFrame: RscText
{
 style = ST_FRAME;
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};
//-------------------------------------
class RscActiveText
{
 type = CT_ACTIVETEXT;
 idc = -1;
 style = ST_LEFT;

 color[] = {Dlg_Color_White,1};
 colorActive[] = {Dlg_Color_Red,1};
 font = FontM;

 sizeEx = Dlg_TEXTHGT;

 soundEnter[] = {"ui\ui_over", 0.2, 1};
 soundPush[] = {, 0.2, 1};
 soundClick[] = {"ui\ui_ok", 0.2, 1};
 soundEscape[] = {"ui\ui_cc", 0.2, 1};
 default = false;
};
//-------------------------------------
class RscButton
{
 type = CT_BUTTON;
 idc = -1;
 style = ST_CENTER;

 colorText[] = {Dlg_Color_White,1};
 colorDisabled[] = {Dlg_Color_Aqua,0.1};
 colorBackground[] = {Dlg_Color_Gray_2,1};
 colorBackgroundActive[] = {Dlg_Color_Yellow,0.4};
 colorBackgroundDisabled[] = {Dlg_Color_Red,0.1};
 colorFocused[] = {Dlg_Color_Black,1};
 colorShadow[] = {Dlg_Color_Pink,0.2};
 colorBorder[] = {Dlg_Color_White,0.2};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;

 offsetX = 0;
 offsetY = 0;
 offsetPressedX = 0;
 offsetPressedY = 0;
 borderSize = 0.001;
 soundEnter[] = {"ui\ui_ok", 0.2, 1};

 soundPush[] = {, 0.2, 1};
 soundClick[] = {"ui\ui_ok", 0.2, 1};
 soundEscape[] = {"ui\ui_cc", 0.2, 1};
 default = false;
 text = "";
 action = "";
};
//-------------------------------------
class RscEdit
{
 type = CT_EDIT;
 idc = -1;
 style = ST_LEFT;

 colorText[] = {Dlg_Color_Black,1};
 colorSelection[] = {Dlg_Color_Gray_5,1};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;

 autocomplete = false;
 text = "";
};
//-------------------------------------
class RscLB_LIST
{
 // type = defined in derived class
 idc = -1;
 style = ST_LEFT;

 color[] = {Dlg_Color_White,1};
 colorText[] = {Dlg_Color_White,1};
 colorSelect[] = {Dlg_Color_White,1};
 colorSelect2[] = {Dlg_Color_White,1};
 colorScrollbar[] = {Dlg_Color_White,1};
 colorBackground[] = {Dlg_Color_Gray_4,1};
 colorSelectBackground[] = {Dlg_Color_Gray_2,1};
 colorSelectBackground2[] = {Dlg_Color_Gray_4,0.75};
 font = FontHTML;

 sizeEx = Dlg_TEXTHGT;
 h = Dlg_CONTROLHGT;
 rowHeight = Dlg_CONTROLHGT;

 soundSelect[] = {"ui\ui_cc", 0.2, 1}; // unchecked
 soundExpand[] = {"ui\ui_cc", 0.2, 1}; // unchecked
 soundCollapse[] = {"ui\ui_cc", 0.2, 1}; // unchecked
};
//-------------------------------------
class RscListBox: RscLB_LIST
{
 type = CT_LISTBOX;

 onLBSelChanged = "";
 onLBDblClick = "";
};
//-------------------------------------
class RscCombo: RscLB_LIST
{
 type = CT_COMBO;

 wholeHeight = 0.3;
};
//-------------------------------------
class RscObject
{
   type = CT_OBJECT;

   scale = 1.0;
   direction[] = {0, 0, 1};
   up[] = {0, 1, 0};
};
//-------------------------------------
class Rsc3DStatic
{
   type = CT_3DSTATIC;
   style = ST_LEFT;

   color[] = {Dlg_Color_Black,1};
   font = FontHTML;

   size = 0.04;

   selection = "display";
   angle = 0;
};
//-------------------------------------
class RscPicture
{
   type = CT_STATIC;
   idc = -1;
   style = ST_PICTURE;

   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {Dlg_Color_White, 1};
   font = Zeppelin32;

   sizeEx = Dlg_TEXTHGT;
 text = "";
};
//-------------------------------------
class RscHTML
{
 type = CT_HTML;
 idc = -1;
 style = ST_LEFT;

   colorText[] = {Dlg_Color_White, 1};
   colorLink[] = {0.05, 0.2, 0.05, 1};
   colorBold[] = {0, 1, 1, 1};
   colorBackground[] = {0, 0, 0, 0.5};
   colorLinkActive[] = {0, 0, 0.2, 1};
   colorPicture[] = {Dlg_Color_Black, 1};
   colorPictureLink[] = {Dlg_Color_Black, 1};
   colorPictureSelected[] = {Dlg_Color_Black, 1};
   colorPictureBorder[] = {Dlg_Color_Black, 1};

   prevPage = "\ca\ui\data\arrow_left_ca.paa";
   nextPage = "\ca\ui\data\arrow_right_ca.paa";
   filename = "";

   class HeadingStyle {
       font = "Zeppelin32";
       fontBold = "Zeppelin33";
       sizeEx = Dlg_TEXTHGT;
   };

   class H1: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.5;
   };

   class H2: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.4;
   };

   class H3: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.3;
   };

   class H4: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.2;
   };

   class H5: HeadingStyle {
       sizeEx = Dlg_TEXTHGT * 1.1;
   };

   class H6: HeadingStyle {
       sizeEx = Dlg_TEXTHGT;
   };

   class P: HeadingStyle {
       sizeEx = Dlg_TEXTHGT;
   };
};
//-------------------------------------
class RscMapControl 
{
 type = CT_MAP_MAIN;
 idc = -1;
 style = ST_PICTURE;

 colorSea[] = {0.56, 0.8, 0.98, 0.5};
   colorForest[] = {0.6, 0.8, 0.2, 0.5};
   colorRocks[] = {0.6, 0.45, 0.27, 0.4};
   colorCountlines[] = {0.7, 0.55, 0.3, 0.6};
   colorCountlinesWater[] = {0, 0.53, 1, 0.5};
 colorMainCountlines[] = {0.65, 0.45, 0.27, 1};
 colorMainCountlinesWater[] = {0, 0.53, 1, 1};
 colorPowerLines[] = {Dlg_Color_Black, 1};
 colorLevels[] = {Dlg_Color_Black, 1};
   colorForestBorder[] = {0.4, 0.8, 0, 1};
   colorRocksBorder[] = {0.6, 0.45, 0.27, 0.4};
   colorNames[] = {Dlg_Color_Black, 1};
   colorInactive[] = {Dlg_Color_White, 0.5};
 colorBackground[] = {Dlg_Color_White, 1};
 colorText[] = {Dlg_Color_White, 1};

 font = "Zeppelin32";
 sizeEx = 0.05;

 fontLabel = "Zeppelin32";
   sizeExLabel = 0.0286458;
   fontGrid = "Zeppelin32";
   sizeExGrid = 0.0286458;
   fontUnits = "Zeppelin32";
   sizeExUnits = 0.0286458;
   fontNames = "Zeppelin32";
   sizeExNames = 0.0286458;
   fontInfo = "Zeppelin32";
   sizeExInfo = 0.0286458;
   fontLevel = "Zeppelin32";
   sizeExLevel = 0.0286458;

 ptsPerSquareSea    = 6;
 ptsPerSquareTxt    = 8;
 ptsPerSquareCLn    = 8;
 ptsPerSquareExp    = 8;
 ptsPerSquareCost = 8;
 ptsPerSquareFor = "4.0f";
 ptsPerSquareForEdge = "10.0f";
 ptsPerSquareRoad = 2;
 ptsPerSquareObj = 10;

   text = "\ca\ui\data\map_background2_co.paa";
 x = 0.1;
 y = 0.1;
 w = 0.3;
 h = 0.3;
 ShowCountourInterval = 0;
 scaleDefault = 0.1;
 onMouseButtonClick = "";
 onMouseButtonDblClick = "";

 class ActiveMarker {
   color[] = {0.3, 0.1, 0.9, 1};
   size    = 50;
 };

   class Legend {
       x = 0.729;
       y = 0.05;
       w = 0.237;
       h = 0.127;
       font = "Zeppelin32";
       sizeEx = 0.0208333;
       colorBackground[] = {0.906, 0.901, 0.88, 0.8};
       color[] = {Dlg_Color_Black, 1};
   };

   class Bunker {
   color[] = {0, 0.35, 0.7, 1};
       icon = "\ca\ui\data\map_bunker_ca.paa";
       size = 14;
       importance = 1.5 * 14 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Bush {
       icon = "\ca\ui\data\map_bush_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 14;
       importance = 0.2 * 14 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class BusStop {
       icon = "\ca\ui\data\map_busstop_ca.paa";
       color[] = {0, 0, 1, 1};
       size = 10;
       importance = 1 * 10 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Command {
       icon = "#(argb,8,8,3)color(1,1,1,1)";
       color[] = {0, 0.9, 0, 1};
       size = 18;
       importance = 1;
       coefMin = 1;
       coefMax = 1;
   };

   class Cross {
   color[] = {0, 0.35, 0.7, 1};
       icon = "\ca\ui\data\map_cross_ca.paa";
       size = 16;
       importance = 0.7 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Fortress {
       icon = "\ca\ui\data\map_bunker_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Fuelstation {
       icon = "\ca\ui\data\map_fuelstation_ca.paa";
   color[] = {1.0, 0.35, 0.35, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.75;
       coefMax = 4;
   };

   class Fountain {
       icon = "\ca\ui\data\map_fountain_ca.paa";
       color[] = {0, 0.35, 0.7, 1};
       size = 12;
       importance = 1 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Hospital {
       icon = "\ca\ui\data\map_hospital_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Chapel {
       icon = "\ca\ui\data\map_chapel_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 1 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Church {
       icon = "\ca\ui\data\map_church_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Lighthouse {
       icon = "\ca\ui\data\map_lighthouse_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 20;
       importance = 3 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Quay {
       icon = "\ca\ui\data\map_quay_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Rock {
   color[] = {0.35, 0.35, 0.35, 1};
       icon = "\ca\ui\data\map_rock_ca.paa";
       size = 12;
       importance = 0.5 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Ruin {
       icon = "\ca\ui\data\map_ruin_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 1.2 * 16 * 0.05;
       coefMin = 1;
       coefMax = 4;
   };

   class SmallTree {
       icon = "\ca\ui\data\map_smalltree_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 12;
       importance = 0.6 * 12 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Stack {
       icon = "\ca\ui\data\map_stack_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 20;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Tree {
       icon = "\ca\ui\data\map_tree_ca.paa";
       color[] = {0.55, 0.64, 0.43, 1};
       size = 12;
       importance = 0.9 * 16 * 0.05;
       coefMin = 0.25;
       coefMax = 4;
   };

   class Tourism {
       icon = "\ca\ui\data\map_tourism_ca.paa";
       color[] = {0.78, 0, 0.05, 1};
       size = 16;
       importance = 1 * 16 * 0.05;
       coefMin = 0.7;
       coefMax = 4;
   };

   class Transmitter {
       icon = "\ca\ui\data\map_transmitter_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 20;
       importance = 2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class ViewTower {
       icon = "\ca\ui\data\map_viewtower_ca.paa";
   color[] = {0, 0.35, 0.7, 1};
       size = 16;
       importance = 2.5 * 16 * 0.05;
       coefMin = 0.5;
       coefMax = 4;
   };

   class Watertower {
       icon = "\ca\ui\data\map_watertower_ca.paa";
       color[] = {0, 0.35, 0.7, 1};
       size = 32;
       importance = 1.2 * 16 * 0.05;
       coefMin = 0.9;
       coefMax = 4;
   };

   class Waypoint {
       icon = "\ca\ui\data\map_waypoint_ca.paa";
     color[] = {0, 0.35, 0.7, 1};
     size = 32;
     coefMin = 1.00;
     coefMax = 1.00;
     importance = 1.00;
   };

   class WaypointCompleted {
       icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
     color[] = {Dlg_Color_Black, 1};
     size = 24;
     importance = 1.00;
     coefMin = 1.00;
     coefMax = 1.00;
   };
};
//-------------------------------------
class RscMap 
{
   access = ReadAndWrite;

   class controls {
       class Map : RscMapControl {
           moveOnEdges = 0;
           x = 0;
           y = 0;
           w = 0.83;
           h = 1;
       };
   };
};

//=============================================================================
// Some common class definitions - most dialogs need a background
class Dlg_FullBackground: RscText
{
 colorBackground[] = {Dlg_Color_Gray_3,1};
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};
//-------------------------------------
class Dlg_FullBackgroundFrame: RscFrame
{
 text = " Selection Dialog ";
 x = 0.0;
 y = 0.0;
 w = 1.0;
 h = 1.0;
};

What you should have so far

1. You should have a folder that is titled Dialogs,

inside that folder you should have 2 scripts named:

Respawn_Dialog.hpp

Respawn_Dialog.sqf

2. You should have a folder that is titled Common which is inside the Dialogs folder.

The Common folder should have 2 scripts inside it and they are:

DialogColorConstants.hpp

DialogControlClasses.hpp

=====================

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Dialogs with 2 scripts, and inside the Dialogs folder you should have another

folder named common with 2 scripts inside that.

=========

Step B

In this next step we will need to create another folder and other scripts, follow the steps below:

1. Create a folder and name it Scripts

inside this folder we need to create a script, so create a script and name it:

respawn_player.sqf

inside this script add this code:

// Desc: A respawn control script

for [{}, {true}, {true}] do
{
 //waitUntil { !(alive player) };
 while { alive player } do { sleep 1.0 };

 nul=[] execVM "Dialogs\Respawn_Dialog.sqf";

 // wait for respawn countdown to finish and for the selection to be made from the dialog
 // (Upon auto respawning after countdown, you will respawn at "RespawnWest" marker.)
 //waitUntil { alive player && !dialog };
 while { !alive player || dialog } do { sleep 1.0 };

 // player spawned at "RespawnWest" marker initially, so move him to final selected spawn location
 player setPos getMarkerPos RespawnLocation;
};

Lets recap:

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Scripts with 1 script inside named respawn_player.sqf

=========

Step C

in this next step we will need to create 2 scripts, follow the steps below:

1. Create a script and name it description.ext

inside the description.ext script put the following codes:

class Header 
{
 gameType=Coop;
 minPlayers=1;
 maxPlayers=5;
};

#include "Dialogs\Common\DialogColorConstants.hpp"
#include "Dialogs\Common\DialogControlClasses.hpp"

#include "Dialogs\Respawn_Dialog.hpp"

Respawn = "BASE";
RespawnDelay = 3;
RespawnDialog = false; // hide spawn countdown dialog

2. Create a script and name it init.sqf

inside the init.sqf put the following code:

RespawnLocation = "m_Start"; // marker name, init start location
player setPos getMarkerPos RespawnLocation;

//player addeventhandler ["Killed", {_this execVM "scripts\respawn_player.sqf"}]; // would rather use event handler
player execVM "scripts\respawn_player.sqf"; // infinite loop, controls respawning

Lets recap:

Inside your mission folder

Inside your mission folder you should have the following folders and files that we just created above:

A folder named Scripts with 1 script inside named respawn_player.sqf

============

Step D

Overview

Overall Folders and scripts what you should have in your missions folder

Folders

[/b] Dialogs,

inside you should have 2 scripts named:

Respawn_Dialog.hpp

Respawn_Dialog.sqf

Inside the Dialogs folder above you should have a folder named

Common

The Common folder should have 2 scripts inside it and they are:

DialogColorConstants.hpp

DialogControlClasses.hpp

Inside the mission folder is:

Scripts folder with 1 script inside named respawn_player.sqf

Dialogs -(folder)

Scripts - (folder)

description.ext

init.sqf

mission.sqm - (mission you created in the editor)

Step E - Editor

Start the game and open your mission in the editor, and follow the steps below:

1. Put down a player, if the mission is a coop then put more units down and make them playable.

Move the units far away from where you want to start, where its isolated.

2. Create a marker (solid) and name it respawn_west

move the marker to the same spot as the units you created, so the units are in the marker area.

Base Marker

3. Create a marker and name it base, under text put start spawn

place this marker at the base where you plan to start your mission.

4. Create a marker and name it m_Start

This is the spawn point like above where you will start, so where ever this marker is at you will start there when the missions starts.

2nd Respawn Marker

5. Create a marker and name it spawn2, under text put spawn2

5a. Create a marker and name it m_WestSpawn2

3rd Respawn Marker

6. Create a marker and name it spawn3, under text put spawn3

6a. Create a marker and name it m_WestSpawn3

=============

Repeat the markers above for 5 markers, if you need more then 5 markers for respawn then you have to define it in the

Respawn_Dialog.sqf which is in the Dialogs folder.

============

Thats basically it.

So when you start you will spawn at the marker m_Start

when you die a menu will popup with a map, choose from the list which spawn you want,

if you click on a spawn the map will zoom there, if you choose that spot then hit ok at the bottom and you will spawn there.

note that there is an error message that will popup randomly which I have no idea on fixing but its random and rare.

I only have the Arma 2 Free version, I don't have the desert map :/

do you have one for utes or chernarus?

Share this post


Link to post
Share on other sites

I just finished testing it! it works perfectly fine, it does show some errors but it still works.

one error that i found is that it says "cleanup.sqf not found" the other error i found is that its about in the description.ext, scrollbar not found something like that.. it's too long, i can't remember the whole error message.

I like that menu it shows the map, which i think is really cool!

Im sorry about replying with quotes lol, im really used to replying with quotes >.<

Thank you for everything!!! i really appreciate it so much!!!

By the way ,did you create these two respawns menu's?

Edited by frezinator

Share this post


Link to post
Share on other sites

Great.

The two errors your getting, the one for the scrollbar I dont know how to fix, it has to do with something in one of the scripts.

the other error the cleanup error is basically a script I use to cleanup dead bodies and destroyed vehicles in one of my missions that I had used with the menu repsawn,

but I forgot to remove the code in the init script so it still asks for that script even though its not there.

If you want to remove that error then just go into the init.sqf script and remove this code:

[] execVM "cleanup.sqf";

and that should stop the game from asking for that script.

Im sorry about replying with quotes lol, im really used to replying with quotes >.<

you only need to quote what someone said if your responding to what they said in particular,

so if i had asked a question and have a bunch of other stuff in my post then you only quote the question, not the whole post.

Then another example is if I post lets say some information that you have a question about but someone comes on and posts something after me,

then what you would do is copy the lines that you have a question about (not the whole post) and then post your question, like I did here, did I quote your entire post?

No, i think you know what you said, but if Im asking about something specific and not about your whole post which has a few things in it then

I will quote only the line or lines that I have a question about.

Quoting my whole tutorial was simply not necessary, I mean seriously I know what I posted, it took me an hour to put that together,

as trying to describe something for someone and make it understandable can be tricky.

By the way ,did you create these two respawns menu's?

No i did not, the one for Arma I extracted from a mission I played and have no idea which one, its been 2-3 years since that time,

and the firs one I posted I got back when Arma2 was the only game being played at the time and I forget where I got that one, but I had used it for a long time.

Share this post


Link to post
Share on other sites

If you want to remove that error then just go into the init.sqf script and remove this code:
[] execVM "cleanup.sqf";

KK thank you!!!

Quoting my whole tutorial was simply not necessary, I mean seriously I know what I posted, it took me an hour to put that together,
as trying to describe something for someone and make it understandable can be tricky.

aah kk im sorry, I will try change my bad quoting habits :)

No i did not, the one for Arma I extracted from a mission I played and have no idea which one, its been 2-3 years since that time, 
and the firs one I posted I got back when Arma2 was the only game being played at the time and I forget where I got that one, but I had used it for a long time. 

Aaah I see

Once again, thank you Gunter for helping me :)

Edited by frezinator

Share this post


Link to post
Share on other sites

Thank you millions for this, its working great, but there's one major problem which i dont know. it works great "respawn_west" so for the west player great but when i put "respawn_east" the east player are able to spawn on those markers which are on the west base. Could you please tell me how to change or fix this, also this is my very first comment in bistudio

Share this post


Link to post
Share on other sites

Thank you millions for this, its working great, but there's one major problem which i dont know. it works great "respawn_west" so for the west player great but when i put "respawn_east" the east player are able to spawn on those markers which are on the west base. Could you please tell me how to change or fix this, also this is my very first comment in bistudio

Share this post


Link to post
Share on other sites

Thank you millions for this, its working great, but there's one major problem which i dont know. it works great "respawn_west" so for the west player great but when i put "respawn_east" the east player are able to spawn on those markers which are on the west base. Could you please tell me how to change or fix this, also this is my very first comment in bistudio

Share this post


Link to post
Share on other sites

I tried the first re-spawn mentioned in the second post on the first page, and this is working great for me !

2 small questions though:

- On first respawn i get a error about class mylistbox not existing, any clue on a fix for this ?

- I'm looking to restrict the usage of this to OPFOR, and have BLUE for respawn at a fixed BASE marker, what would be the best place for a if check ?

Thanks in advance for any help !

Share this post


Link to post
Share on other sites

This is a question I also had, thanks for the info, but I've got a couple of questions;

-I understand that this was originally written for ArmA, and then ported to ArmA 2. Will this work in ArmA 3?

-Will the respawned players have the loadout I specified in their init field?

-Will the respawned players have the ability to call in the support I synced to the original player?

I know this is an older thread, just hoping that you still check in now n then...

Edited by Kupcho
multiple posts

Share this post


Link to post
Share on other sites

Hi, sorry I haven't seen this thread in a while, I will answer what i can:

- On first respawn i get a error about class mylistbox not existing, any clue on a fix for this ?

No, nothing I can do about it.

- I'm looking to restrict the usage of this to OPFOR, and have BLUE for respawn at a fixed BASE marker, what would

be the best place for a if check ?

Have no idea about if check, but heres what I would do:

in the Respawn_Dialog.sqf

["1 - Base", "m_Start"],
   ["2 - Spawn2", "m_WestSpawn2"],
   ["3 - Spawn3", "m_WestSpawn3"],
   ["4 - Spawn4", "m_WestSpawn4"],
   ["5 - Spawn5", "m_WestSpawn5"]

change the name westspawn2-5 to Eastspawn

In the mission itself change the markers to the same as above.

also the the hidden location of the spawn where the units are initially before you start at the spawn m_start, change the units as well to opfor.

Problem is the opfor will use the menu np, but I dont know how to define a separate base respawn as they will use the menu as well.

Does the spawn menu also work on arma2 "Patrol Ops" (similar to Domination)?

Probably wont work if patrol ops already has a spawn in place.

-I understand that this was originally written for ArmA, and then ported to ArmA 2. Will this work in ArmA 3?

I see no reason why it wouldn't, test it and see if it works.

-Will the respawned players have the loadout I specified in their init field?

Yes it should, when i used this menu respawn I had a script runnign with codes in the playable characters, one of which was

for keeping the same weapons you had when you died, and it worked for me np.

-Will the respawned players have the ability to call in the support I synced to the original player?

Yes it should, I'm thinking if the player has a name and the name was defined in a script for the support your using it can work,

as for synced support, i really have no idea.

Edited by Günter Severloh

Share this post


Link to post
Share on other sites

In fear of being verbally abused for reviving a thread nearly 200 days old, here goes nothing.

Okay so I have read this a ton so far, and as any beginner to SQF, this stuff is confusing (I know C Style coding, but SQF is like spanish backwards).

About the code posted on the second page..

1. Can you make it show when a player first spawns and when they die/respawn?

2. Also, can you hide (black out) the background when the dialog is shown?

(By the way this does work in Arma 3)

My findings so far..

Ive found the loop in respawn_player.sqf did not do much if the timer ran out before a selection was made.. so I commented out the "player setPos getMarkerPos RespawnLocation;" and the while loop and used...

_pos = getMarkerPos lbData [sPWN_IDC_RespawnList, _selectedIndex]
player setPos _pos

.. in SPWN_AcceptButton. The problem is that the player still spawns while the menu is up and spawns at what ever is highlighted.

Any suggestions?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×