Script Revive
Version : 1.3
Dernière modification : 23/07/11
Auteur : The-KiLLeR
Here is the script allowing to revive an unconcious player.
It's a light and easy to use revive script.
After beeing shot down, the player can be revive by an other player or respawn to base/mobile respawn.
Files
First, an init.sqf and description.ext files must be created in the mission directory as shown below, then add ADO_revive directory.
init.sqf
Code:
T_INIT = false;
T_Server = false;
T_Client= false;
T_JIP = false;
T_MP = (if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then {true} else {false});
if (isServer) then
{
T_Server = true;
if (!isNull player) then {T_Client = true};
T_INIT = true;
} else {
T_Client = true;
if (isNull player) then
{
T_JIP = true;
[] spawn {waitUntil {!isNull player};T_INIT = true};
} else {
T_INIT = true;
};
};
waitUntil {T_INIT};
execVM "ADO_revive\revive_init.sqf";
description.ext
Code:
respawn = 3;
respawnDelay = 10;
class Params
{
class paramRevive
{
title = "Nombre de vie";
values[] = {1,3,5};
texts[] = {"1","3","5"};
default = 3;};
};
#include "ADO_revive\revive_dialog.h"
ADO_revive directory
Download and copy the ADO_revive directory in your mission directory.
At last you must have those files and directory in your mission directory :
mission.sqm
description.ext
init.sqf
ADO_revive/
revive_actions.sqf
revive_armements.sqf
revive_dialog.h
revive_init.sqf
revive_reapparition.sqf
How to use
All the playable units must have a name.
A "ado_revive_zone_morts" marker must be set anywhere -but not in water- on the map, here will respawn players without any life left.
Respawn Marker/s must be set on the map
revive_init.sqf set in ADO_revive directory must be edited to configure the revive, here is the editable part, all the rest must be left untouched.
Code:
/* ==================== CONFIGURATIONS ==================== */
// Nombre de vie
//Number of lives
ADO_REVIVE_nb_vies = paramsArray select 0;
// Temps avant de pouvoir cliquer sur les boutons de réapparition (en seconde)
// Time before click on respawn button/s is allowed (in s.)
ADO_REVIVE_temps_bp = 150;
// Temps avant de réapparaitre à la base quand on est mort dans l'eau (en seconde)
//Time before base respawn if killed in water (in s.)
ADO_REVIVE_temps_eau = 50;
// La personne réanimé ne perd pas de vie (true = Activer, false = Désactiver)
// Revived player do not lost a life (true = Activated, false = Désactivated)
ADO_REVIVE_reanimer_vie = true;
/* ---------- [ BASE ] ----------
ADO_REVIVE_zone :
- true : Activer
- false : Désactiver
ADO_REVIVE_zone_ouest, ADO_REVIVE_zone_est, ADO_REVIVE_zone_independant, ADO_REVIVE_zone_civil :
Indiquer le nom du marqueur où les joueurs réapparaitront selon leur camp
C'est le respawn à la base
Set name of marker for Base respawn
*/
ADO_REVIVE_zone = true;
ADO_REVIVE_zone_ouest = "respawn_west";
ADO_REVIVE_zone_est = "respawn_east";
ADO_REVIVE_zone_independant = "respawn_guerrila";
ADO_REVIVE_zone_civil = "respawn_civilian";
/* ---------- [ MOBILE RESPAWN ] ----------
ADO_REVIVE_mobile_respawn :
- true : Activer
- false : Désactiver
ADO_REVIVE_nb_mobile_respawn :
1 : un mobile respawn nommé OBLIGATOIREMENT ado_mobile_respawn_1
If one mobile respawn is set it MUST BE NAMMED ado_mobile_respawn_1
2 : deux mobiles respawn nommés OBLIGATOIREMENT ado_mobile_respawn_1 ET ado_mobile_respawn_2
If two mobile respawns are set they MUST BE NAMMED ado_mobile_respawn_1 AND do_mobile_respawn_2
*/
ADO_REVIVE_mobile_respawn = false;
ADO_REVIVE_nb_mobile_respawn = 1;
* All unit can revive
* Once revived the player is still hurt, full healing by a medic is needed
* Dragging unconscious body allowed
* Can get 0, 1 ou 2 mobile respawn
* Weapons saved
* Can configure respawn area (base)
* Can configure number of lives
* Can configure waiting timer before Base spawn allowance