Jump to content
HazJ

[Abandoned] [Release] Respawn Selection Menu

Recommended Posts

!!! THIS PROJECT HAS NOW BEEN ABANDONED !!!

!!! SUPPORT WILL BE LIMITED AND NO NEW VERSIONS WILL BE RELEASED FOR THE FORESEEABLE FUTURE !!!

 

 

Hi,
I'm releasing the first part of the respawn selection menu. The loadout part will be released when it is done.

createDialog "dlg_respawnSelectionMenu";

Add respawn position later on in the mission:

[
 /*
		NOTE: ARRAY must be a 3D position
		_target - OBJECT/ARRAY/SIDE (required)
		_respawnPointName - STRING (required)
		_respawnPointIcon - STRING (optional)
		_respawnPointPosition - OBJECT/ARRAY/STRING (optional)
		_respawnPointRadius - SCALAR (optional)
 */
] call Haz_fnc_addRespawnPosition;
Quote

params
[
    ["_target", playableUnits],
    ["_respawnPointName", "Another Respawn Point"],
    ["_respawnPointIcon", "\A3\ui_f\data\map\markers\military\flag_CA.paa"],
    ["_respawnPointPosition", (getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"))],
    ["_respawnPointRadius", 0]
];

Remove respawn position later on in the mission:

[
 /*
		_target - OBJECT/ARRAY/SIDE (required)
		_respawnPointName - STRING (required)
 */
] call Haz_fnc_removeRespawnPosition;
Quote

params
[
    ["_target", playableUnits],
    ["_respawnPointName", ""]
];

Examples:

[player, "Somewhere"] call Haz_fnc_addRespawnPosition;
[player, (format ["%1's Magical Mystery Bunker", name player]), "\A3\ui_f\data\map\markers\military\flag_CA.paa", (getPosATL player)] call Haz_fnc_addRespawnPosition;
[player, "MHQ", "\A3\ui_f\data\map\markers\flags\UK_ca.paa", (getPos MHQ), 75] call Haz_fnc_addRespawnPosition;

[player, "Somewhere"] call Haz_fnc_removeRespawnPosition;
[player, (format ["%1's Magical Mystery Bunker", name player])] call Haz_fnc_removeRespawnPosition;
[player, "MHQ"] call Haz_fnc_removeRespawnPosition;

Any questions or problems, just ask! If you want to translate it into any of the supported languages, open the stringtable.xml file. Feel free to submit them to me to be released with later versions. Example:

		<Key ID="STR_dialogTitle">
			<English>Respawn Selection</English>
			<Spanish>Translation here</Spanish> <!-- Like this -->
		</Key>

config_respawnPoints.hpp:

class config_respawnPoints
{
	respawnPoints[] =
	{
		"bluforRespawnPoint",
		"docksRespawnPoint",
		"supplyBaseRespawnPoint",
		"sea"
	};
	class bluforRespawnPoint
	{
		name = "BLUFOR Base";
		icon = "\A3\ui_f\data\map\markers\military\flag_CA.paa";
		position = "respawn_west";
		radius = 5;
		condition = ""; // NOT IMPLEMENTED YET
	};
	class docksRespawnPoint
	{
		name = "Docks";
		icon = "\A3\ui_f\data\map\groupicons\selector_selectedMission_ca.paa";
		position = "docks";
		radius = 15;
		condition = ""; // NOT IMPLEMENTED YET
	};
	class supplyBaseRespawnPoint
	{
		name = "Supply Base";
		icon = "\A3\ui_f\data\map\markers\nato\respawn_inf_ca.paa";
		// position[] = {0, 0, 0};
		position = "supplyBase";
		radius = 75;
		condition = ""; // NOT IMPLEMENTED YET
	};
	class sea
	{
		name = "The Sea";
		icon = "\A3\ui_f\data\map\markers\military\flag_CA.paa";
		position[] = {0, 0, 0};
		radius = 125;
		condition = ""; // NOT IMPLEMENTED YET
	};
};

Download link:

https://1drv.ms/u/s!ArYSs9w5RSIDhD9xEOqPGFy4MciH

DO NOT MIRROR OR RE-UPLOAD

@foxhound - you can 🙂

Edited by HazJ
Project has now been abandoned
  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Here's a video showing the config in action.

 

UPDATE:

- List population function done

- Respawn function done

- Dialog is about 80% done - still need to do the inventory part and the text between the arrows at bottom

- Map animation terminates (aborts previous ones) when you click on a new respawn point

- All config options are done (except for condition as still thinking about this)

- Added functions to add and remove position(s) with the same arguments as in the config file (during the mission)

 

Radius is a circle, within supplied distance (in m). It doesn't find a suitable spot though - unflat terrain, water, etc are not checked! I am probably going to include a function for this which you can pass to the condition in the config file.

 

A3_respawnSelectInventory.jpg

 

Not sure if I am going to do it completely like this. Hm... Let me know if you prefer it like above. Feedback/suggestions welcome!

Share this post


Link to post
Share on other sites
16 hours ago, HazJ said:

Here's a video showing the config in action.

 

UPDATE:

- List population function done

- Respawn function done

- Dialog is about 80% done - still need to do the inventory part and the text between the arrows at bottom

- Map animation terminates (aborts previous ones) when you click on a new respawn point

- All config options are done (except for condition as still thinking about this)

- Added functions to add and remove position(s) with the same arguments as in the config file (during the mission)

 

Radius is a circle, within supplied distance (in m). It doesn't find a suitable spot though - unflat terrain, water, etc are not checked! I am probably going to include a function for this which you can pass to the condition in the config file.

 

A3_respawnSelectInventory.jpg

 

Not sure if I am going to do it completely like this. Hm... Let me know if you prefer it like above. Feedback/suggestions welcome!

Would be nice if it looked like that but it was just spawn points on the left and the map on the right :)

Share this post


Link to post
Share on other sites

The original had both in one. The inventory/loadout would only show if you had it setup I think, can't remember. The arrows at the bottom is how you cycled between to the two. The reason why I asked about if people would like it like the above (original style) is because I had future plans to implement a more advanced loadout system. It was just an idea really though.

Share this post


Link to post
Share on other sites
4 minutes ago, HazJ said:

The original had both in one. The inventory/loadout would only show if you had it setup I think, can't remember. The arrows at the bottom is how you cycled between to the two. The reason why I asked about if people would like it like the above (original style) is because I had future plans to implement a more advanced loadout system. It was just an idea really though.

Ah okay. Just iv'e been looking for a respawn menu like this but didn't want the guns lol, maybe you could release a version of each

Share this post


Link to post
Share on other sites

It's all together but you won't see the inventory part. Not unless you enable and configure it.

  • Like 1

Share this post


Link to post
Share on other sites

Still working on this. Hopefully not too long of a wait for the first release. Just messing with lnb commands. The column positions are a pain, or at least I haven't mastered them yet. :P

20171104014329_1.jpg

The respawn part is done, at least for the first release version.

  • Like 2

Share this post


Link to post
Share on other sites

I have now mastered the column positions! :yay:

20171106022735_1.jpg

 

Share this post


Link to post
Share on other sites

I have been away for a couple of days. Back now and will resume working on it shortly.

Share this post


Link to post
Share on other sites

Just an update to say, this isn't dead. I ran into a problem which can't be fixed it seems, not without working around it. It annoyed me and put me off working on it for a short amount of time. Should have time to start on it again tomorrow (or tonight rather since it's 02:48 in the morning). The thing isn't really a big deal either, it's just the time it took to move it all into RscControlsGroup, etc... I made a backup before but still, yeah... This was it:

The cut off point doens't work for the RscMapControl it seems, sucks. Could probably resize the map but it would look stupid I assume. Watch the video in slow mo if you don't see it in time.

  • Like 1

Share this post


Link to post
Share on other sites

Released v0.1 (no loadout part yet) - See first post for info!

  • Like 1

Share this post


Link to post
Share on other sites

I will be releasing a hotfix later today/early-tomorrow which will fix duplicate item in list, as well as errors. Plus tweaked example mission to show respawn menu after clicking respawn button and death (optional via config).

Share this post


Link to post
Share on other sites

Not dead, update is still coming. I decided to wait a little bit so I could focus on expanding this, etc... See below!

Quote

respawnDelay2: How long it takes to respawn you after clicking the respawn button on the dialog. 0 = INSTANT
respawnDialog2: Whether or not to show the dialog after being killed. 1 = SHOW DIALOG
respawnButton2: Whether or not to show the dialog after pressing the respawn button on the Esc menu. 1 = SHOW DIALOG
mapAnimDelay: How long it takes for the map animation to complete on the dialog. Must be above 0!
respawnPoints: List of respawn points. These are available to everyone regardless of their side.
westRespawnPoints: List of BLUFOR respawn points.
eastRespawnPoints: List of OPFOR respawn points.
independentRespawnPoints: List of Independent respawn points.
civilianRespawnPoints: List of Civilian respawn points.

Quote

name: Name of the respawn point which is shown in the list on the dialog.
side: Which side can spawn there. 0 = ANYONE || 1 = BLUFOR || 2 = OPFOR || 3 = Independent || 4 = Civilian
addSidePrefix: Add side prefix in front of respawn point name in the list on the dialog. Only works if side option is set above 0.
icon: Icon shown left of the respawn point name in the list on the dialog.
position: Where you spawn after selecting the respawn button.
radius: Maximum radius where you can spawn in from the center position of the respawn point.
condition: Code condition which must be met before you are spawned.
code: Code which is executed upon spawning.
respawnMessageType: Respawn message type. 0 = NONE (no message is shown) || 1 = Shows respawn point name and time (see BIS_fnc_typeText on Wiki) || 2 = Custom message (if customRespawnMessage option is left blank then it will default back to 0 = NONE)
isSector: The respawn point will act as a sector which can be contested. Spawn is only available if your side owns the sector.

Off the top of my head:
- Fixed duplicate items in the list on the dialog
- After pressing respawn on the button on the in-game Esc menu will show the respawn dialog
- Added player name at the far right title bar in the dialog
- Expanded and improved config options
- Code cleanup and fixes

new_config.png

20171216025424_1.jpg
20171216025508_1.jpg
20171216031240_1.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Hi @HazJ

 

Your help in Jebus recently drew me to your website via your signature and this thread soon after. I was wondering since the keyword that has me interested in your work here is Respawn, whether I could ask if this script or an edited version may suit my clan's needs?

Currently we have a slightly messy version of a Respawn where the following happens:

1. Player joins game and plays until death,

2. Player enters Ace Spectator,

3. If player chooses or is asked to JIP, he has to abort and rejoins his original slot via the MP lobby.

 

Does your script offer a cleaner way to perform a respawn straight to base at any time during during Spectating?

Share this post


Link to post
Share on other sites

Yes. You can define one or more respawn points. See example mission.

Share this post


Link to post
Share on other sites

Hi mate, I've checked out mission and I can see there are respawn points around the map, but how do I initialise a respawn to test? Also I can't seem to find any documentation on how to configure?

Share this post


Link to post
Share on other sites

Hello. Sorry for late reply, only just got home. Where are you stuck? You can configure respawn points in the config_respawnPoints file inside config\ folder. If you wish to add/remove respawn points on the fly, use the function. See first post for info & examples.

EDIT:

// try...
createDialog "dlg_respawnSelectionMenu";

// to have it show upon respawn, use the EH...
player addEventHandler ["Respawn",
{
	createDialog "dlg_respawnSelectionMenu";
}];

Can't remember for sure. Been a while since release. I still need to finish it off but was demotivated as nobody really seemed interested until now.

Share this post


Link to post
Share on other sites

I gave this a test yesterday as someone was asking me questions about it. I used the GitHub version and it is broken and messed up. Certain things aren't working and most things are missing. No idea what happened. I have added this project back on my TODO list so I will try to push update ASAP.

Share this post


Link to post
Share on other sites

Thanks for the reply and I'm keen if you are!

I was just asking questions as somebody who is generally inexperienced from a scripting POV, that I wouldn't mind some instructions that cater to a "simpler" audience. But I do see that you have to fix a few things so I will wait for a stable version again.

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

×