It's the default in the new BSO Framework, no need to change anything
Respawns can be configured in respawns.hpp as per the config section
respawnTemplates[]
MUST be {"BSO_Respawn_System", "MenuPosition"}
respawnOnStart
MUST be -1
respawn
MUST be 3
respawnDialog
MUST be 0
respawnDelay
SHOULD be more than 5Tickets are reduced when dying and going to the Respawn Position Menu. Going straight to spectator due to a lack of spawn points or tickets does not consume a ticket. Going from the Respawn Position Menu to Spectator does not give the ticket back.
Should be done in respawn.hpp.
Template with comments (Framework has this in commented out in respawns.hpp. Just uncomment and go wild):
class BSORespawns
{
class west // valid sides are west, east, guer, civ. Unused ones can be skipped
{
sideTickets = 20; // tickets for this side. default 0.
personalTickets = 0; // tickets per person. will be consumed first. default 0 -> Entry could be skipped in this case.
personalTicketsUnit[] = {{"jtac_0", 3}, {"pl_0", 2}}; // Specific personal ticket count for certain units. Those replace the amount given in personalTickets for those units.
// once there are no more tickets, people will be sent to ace spectator (no box). Happens automatically and does not require the onTicketsDepleted to do anything special.
// If there are no respawn points defined, players will be sent to ace spectator anyways, but will keep their tickets (can be used for wave respawn with tickets)
onTicketsDepleted = "mission\respawnTicketsDepleted.sqf"; // File will be executed on the server when side tickets run out. This is optional and can be used for custom behaviour. Only parameter is the side.
class MHQ // Some vehicle spawn point. This is the name it will be referenced by; it needs to be unique across all sides
{
name = "Mobile HQ"; // displayed name
object = "b_mhq"; // variable name of a vehicle. Spawn point will become unavailable if vehicle is destroyed
};
class FirstObjective // Some marker spawn point
{
name = "First Object Respawn";
marker = "obj_1"; // some map marker
disabled = true; // won't show up until enabled via command (see below)
};
class PilotRespawn
{
name = "Airfield";
marker = "airfield";
units[] = {"pilot_1", "pilot_2"}; // only those units will be able to see this spawnpoint
};
};
};
Activates a formerly inactive respawn location.
Can be executed anywhere, has global effect.
Parameters
* Spawn point name (string): unique name, i.e. name as per config.
Example
["FirstObjective"] call bso_respawn_fnc_activatePoint
Makes the spawn point named FirstObjective available for respawn.
Deactivates a formerly active respawn location.
Can be executed anywhere, has global effect.
Parameters
* Spawn point name (string): unique name, i.e. name as per config.
Example
["PilotRespawn"] call bso_respawn_fnc_deactivatePoint
Makes the spawn point named PilotRespawn (unique name / name as per config, see above) unavailable for respawn.
We are using the BIS Tickets system, so this function can be used to manipulate tickets.
See
BI Wiki
for details.
Only player and side targets are supported!
Can be executed anywhere, has global effect.
Examples
[west, 5] call BIS_fnc_respawnTickets;
Adds 5 tickets to blufor
[jtac_0, 2] call BIS_fnc_respawnTickets;
Adds 2 Tickets to the unit called jtac_0
Respawn players that are currently waiting in spectator mode and teleports them to the given spawn point. The spawn point can be inactive.
Only players that can spawn at this spawnpoint (restricted by side and spawn point units[]) are considered.
If consumeTickets is true, only players with tickets will be respawned (be it side tickets or personal tickets). The order in which side tickets are consumed is randomised.
The callback can be used to execute code after the player has respawned. It will be executed on the players machine. callbackArguments will be passed to it. This allows you to run paradrop scripts, randomise spawn locations, or whatever else you can imagine.
Parameters
* Spawn point name (string): unique spawn point name, i.e. name as per config
* consumeTickets (bool), default false: Whether or not tickets will be consumed by this spawn.
* Callback (code), default {}: Code to be executed on the player machine once the player has respawned.
* Callback Arguments (array), default []: Arguments passed to the callback code.
Examples (Assuming the config from above)
["FirstObjective"] call bso_respawn_fnc_waveRespawn;
All blufor players that are currently in spectator will be respawned on the obj_1 marker.
["PilotRespawn", true, {[] execVm "mission\paradrop.sqf"}] call bso_respawn_fnc_waveRespawn;
All blufor players that have tickets will be parked at the PilotRespawn for a split second, where some paradrop script (not included) is executed.
There's an MHQ vehicle with var name b_mhq
. Blufor players can spawn on it until 10 tickets are depleted, at which point a notification is shown.
mission\respawnTicketsDepleted.sqf:
["BSOMission",["Reinforcements have run out!"]] remoteExec ["BIS_fnc_showNotification", -2];
respawns.hpp:
class BSORespawns
{
class west
{
sideTickets = 10;
onTicketsDepleted = "mission\respawnTicketsDepleted.sqf";
class MHQ
{
name = "Mobile HQ";
object = "b_mhq";
};
};
};
There's an MHQ vehicle with var name e_mhq
. Each opfor player can spawn on it once.
respawns.hpp:
class BSORespawns
{
class east
{
personalTickets = 1;
class OpforMHQ
{
name = "Mobile HQ";
object = "e_mhq";
};
};
};
Both pilots (named pilot_1
and pilot_2
) can respawn at the marker named airfield_marker
and have 2 tickets each for that.
respawns.hpp:
class BSORespawns
{
class west
{
personalTicketsUnit[] = {{"pilot_1", 2}, {"pilot_2", 2}};
class PilotRespawn
{
name = "Airfield";
marker = "airfield_marker";
units[] = {"pilot_1", "pilot_2"};
};
};
};
When the first objective is taken, players currently waiting in spectator will be spawned on it, and future reinforcements can spawn on this objective (Until tickets are out, ofc).
respawns.hpp:
class BSORespawns
{
class west
{
sideTickets = 5;
class FirstObjective // Some marker spawn point
{
name = "First Objective Respawn";
marker = "obj1_marker";
disabled = true;
};
};
};
Server only trigger firing after first objective has been taken:
["FirstObjective", true] call bso_respawn_fnc_waveRespawn;
["FirstObjective"] call bso_respawn_fnc_activatePoint;
Players will go to spectator when they die. Admin can call in reinforcement waves until 20 tickets have been used.
respawns.hpp
class BSORespawns
{
class west
{
sideTickets = 20;
class DropZone; // Some marker spawn point
{
name = "Doesn't matter no one will see it";
marker = "dz_1";
disabled = true;
};
};
};
init.sqf, bottom:
["Call reinforcements", {["DropZone", true, {[] execVm "mission\paradrop.sqf"}] call bso_respawn_fnc_waveRespawn}] call bso_admin_fnc_addAdminAction;
paradrop.sqf: Some script that puts the player into a parachute and drops him over dz_1