Arma 3 Respawn: New Respawn Screen

From Bohemia Interactive Community
Jump to: navigation, search


This article has been submitted for deletion The reason given was: Content of this page was merged with Arma 3 Respawn. No links to this page left.



Overview

The new Respawn Screen was released with
Introduced with Arma 3 version 1.60
. The screen is based on the older version present in Arma 3 before, but it changes design of the old version and adds some new features.
The screen is shown only if respawn templates MenuPosition and/or MenuInventory are used in a mission! For more info see Respawn documentation.


Main Features:

  • [NEW] Spectator Camera (requires Spectator respawn template)
  • [NEW] Autorespawn
  • [NEW] Role selection
  • [NEW] Limits
  • Position selection
  • Loadout selection
  • Loadout preview
  • Loadout details
  • Remaining respawns (requires Tickets respawn template)
  • Teammates alive


Basic Features

Spectator Camera

The Spectator Camera used in here is slightly modified (no free camera available etc.) version of Spectator Mode. For full documentation see Spectator Mode documentation.

Mission designer needs to use the Spectator respawn template (see Respawn documentation), the camera is disabled otherwise.

Loadouts and Roles

The main purpose of the roles is to make things more clear and simple for player when selecting loadout. All the loadouts available in a mission are now divided into various roles.
Mission designer can use roles already created in the game config, or custom roles can be defined in description.ext file. Loadouts with no role assigned are automatically assigned to the Default role.
Loadout config example:

class CfgRoles
{
    class Assault//Class name used in CfgRespawnInventory
    {
        displayName = $STR_A3_Role_Assault;//Name of the role, displayed in the respawn menu
        icon = "a3\missions_f_exp\data\img\classes\assault_ca.paa";//Icon shown next to the role name in the respawn screen
    };
};
 
class CfgRespawnInventory
{
    class B_SquadLeader//Class of the respawn inventory, used by BIS_fnc_addRespawnInventory
    {
        displayName = $STR_b_soldier_sl_f0;//Name of the respawn inventory
        role = "Assault";Role the respawn inventory is assigned to
        icon = "\A3\ui_f\data\map\VehicleIcons\iconManLeader_ca.paa";//Icon shown next to the role
        show = "side group _this == west";//Condition used to make specific respawn inventories only avaiable for specfic sides, must return [[Boolean]]
        weapons[] = {//Weapons
            "arifle_SPAR_01_khk_F",
            "Rangefinder",
            "hgun_P07_khk_F"
        };
        magazines[] = {//Magazines
            "SmokeShell",
            "SmokeShell",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "30Rnd_556x45_Stanag_Tracer_Red",
            "HandGrenade",
            "HandGrenade"
        };
        items[] = {//Useable items
            "FirstAidKit"
        };
        linkedItems[] = {//Linked items, also weapon items, helmet etc.
            "V_PlateCarrierSpec_tna_F",
            "H_HelmetB_Enh_tna_F",
            "optic_ERCO_blk_F",
            "acc_pointer_IR",
            "NVGoggles_tna_F",
            "ItemGPS",
            "ItemMap",
            "ItemCompass",
            "ItemWatch",
            "ItemRadio"
        };
        uniformClass = "U_B_T_Soldier_SL_F";//uniform
    };

Export Function:

  • The following function will copy a complete respawn inventory to your clipboard, see function header for more information, contact User:R3vo if you have questions.
/*
	Author: Revo

	Description:
	Retrieves loadout of unit and formats it for CfgRespawnLoadouts. Content is copied to clipboard and returned by function.

	Parameter(s):
	0: Object - Object to take the loadout from
	1: String - Class name of the respawn loadout
	2: String - Display name of the respawn loadout
	3: String - Icon path displayed next to display name
	4: String - Loadouts are assigned to a role, possible values:
		"Assistant"
		"CombatLifeSaver"
		"Crewman"
		"Default"
		"Grenadier"
		"MachineGunner"
		"Marksman"
		"MissileSpecialist"
		"Rifleman"
		"Sapper"
		"SpecialOperative"
		"Unarmed"
	5: String - Condition for the respawn loadout to be shown. Code inside string has to return boolean. _this refers to the unit inside the respawn screen

	Can also be custom one, needs to be defined in CfgRoles, visit https://community.bistudio.com/wiki/Arma_3_Respawn:_New_Respawn_Screen for more information

	Returns:
	String - Exports formatted loadout
*/

params
[
	["_object",player,[objNull]],
	["_class","REPLACE",[""]],
	["_displayName","REPLACE",[""]],
	["_icon","\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa",[""]],
	["_role","Default",[""]],
	["_conditionShow","true",[""]]
];

private _indent = "    ";
private _class = format ["class %1",_class];
private _displayName = format ["displayName = ""%1"";",_displayName];
private _icon = format ["icon = ""%1"";",_icon];
private _role = format ["role = ""%1"";",_role];
private _conditionShow = format ["show = ""%1"";",_conditionShow];
private _uniformClass = format ["uniformClass = ""%1"";",uniform _object];
private _backpack = format ["backpack = ""%1"";",backpack _object];
private _export = _class + endl + "{" + endl + _indent + _displayName + endl + _indent + _icon + endl + _indent + _role + endl + _indent + _conditionShow + endl + _indent + _uniformClass + endl + _indent + _backpack + endl;
private _weapons = weapons _object;
private _primWeaponItems = primaryWeaponItems _object;
private _secWeaponItems = secondaryWeaponItems _object;
private _assignedItems = assigneditems _object;
//From BIS_fnc_exportLoadout START
private _fnc_addArray =
{
	params ["_name","_array"];
	_export = _export + format [_indent + "%1[] = {",_name];
	{
		if (_foreachindex > 0) then {_export = _export + ",";};
		_export = _export + format ["""%1""",_x];
	} foreach _array;
	_export = _export + "};" + endl;
};

["weapons",_weapons + ["Throw","Put"]] call _fnc_addArray;
["magazines",magazines _object] call _fnc_addArray;
["items",items _object] call _fnc_addArray;
["linkedItems",[vest _object,headgear _object,goggles _object] + _assignedItems - _weapons + _primWeaponItems + _secWeaponItems] call _fnc_addArray;
//From BIS_fnc_exportLoadout END
_export = _export + "};" + endl + "//Visit https://community.bistudio.com/wiki/Arma_3_Respawn for detailed information";

copyToClipboard _export;
_export
To add any loadout as available in your mission, you need to use the BIS_fnc_addRespawnInventory function!

Item Disabling

Respawn positions, Roles and Loadouts can be disabled. This can happen automatically or can be manually called by mission designer.
Automatic Disabling

  • Unit used as respawn point is dead
  • Role/Loadout limit was reached (see Limits)

Manual Disabling
Any item in Location, Role or Loadout list can be disabled by mission designer. This is done via the BIS_fnc_showRespawnMenuDisableItem function.

Limits

One of the new features is ability to limit roles and loadouts. This way only limited number of player can use given role/loadout in a mission. This is done by optional parameters in the BIS_fnc_addRespawnInventory function.
Example:

[missionNamespace,["WEST1",5,10]] call BIS_fnc_addRespawnInventory;

First number is limit for given loadout (use 0 for no limit), second number is limit for role assigned to given loadout (use 0 for no limit).

  • Only role or only loadout can be limited at one moment, if there is limit for both, then only role uses limit.
  • If the limit definition for role is called multiple times with different numbers, then the highest number is used.


Advanced Features

Timeout disabling

Mission designer can disable the timeout used between death of a unit and opening of the respawn screen.
This can be simply achieved by setting variable BIS_RscRespawnControls_skipBlackOut to true. For original timeout set it to nil.