meatball 25 Posted March 10, 2014 Quick question. What variable stores the location of the player when they are 'down' and awaiting revive? Share this post Link to post Share on other sites
giallustio 770 Posted March 10, 2014 It's not public. What do you need it for? Share this post Link to post Share on other sites
meatball 25 Posted March 10, 2014 Think I figured out what I needed. Basically if you set the mission to disable respawn (BTC_disable_respawn = 1) the player will drop 'unconscious' when they take enough damage to die and sit in the waiting for revive state up until BTC_revive_time_max runs out. But at that point the players do still get the Respawn menu and can respawn. What I wanted to do (and think I've figured out), is that the player goes down, waits for revive and if the max revive time runs out, they get rescued by a 'friendly local' and respawn at a random point within 500m of where they were waiting to revive (minus almost all their gear). I was able to get everything to work by editing the BTC_player_respawn function to capture the players actual position at the beginning of the function and then right before they are supposed to respawn I run an outside script that I pass that location to that randomizes their location and strips out most of their gear. Was just having trouble tracking down exactly where I needed to place that and how to get the correct player position :) Share this post Link to post Share on other sites
giallustio 770 Posted March 10, 2014 Great! A suggestion: replace the fnc after laoding the revive, so in case of an update, you don't need to re-modify the fnc Share this post Link to post Share on other sites
Flying-Coyotus 12 Posted March 12, 2014 Hello, Have a strange issue: after respawn, soldier become "purple" > civilian, so ennemy wont fire any more. (both lite and normal version) If I get back to version 0.96 > no problem. An idea ?? Thanks Share this post Link to post Share on other sites
Azza276 25 Posted March 12, 2014 (edited) Yeah, I've been seeing a similar issue to flyingcoyotus. Also I have an issue where when I respawn, I respawn in the place I died, not at the respawn_west, and when I respawn I am prone and cannot stand up or crouch. I can't even heal. Put the same respawn parameters into the previous release, not a problem. Edited March 14, 2014 by Azza276 Share this post Link to post Share on other sites
mech79 10 Posted March 14, 2014 (edited) Was just wondering I am trying to get multiple mobile respawn vehicles. Here is my revive.int /* Created by =BTC= Giallustio version 0.96 Offical release Visit us at: http://www.blacktemplars.altervista.org/ 06/03/2012 */ ////////////////// EDITABLE \\\\\\\\\\\\\\\\\\\\\\\\\\ BTC_r_new_system = 0; //WIP - set 1 to activate it BTC_r_wait_for_revive = 1;//If BTC_r_new_system set to 1 you can choose if you want or not a revive time available after death (Similar to wounding system in ACE) BTC_r_action = 0;//[NOT IMPLEMENTED] - 0 if you don't want the healing animation (ACE style), 1 if you want the animations (You can't stop the animation) BTC_r_med_fa = 1;//0 for only first aid kit, 1 if you don't have a medikit you need a first aid kit, 2 only medikit BTC_r_cpr_time = 60; BTC_r_trans_ratio = 100; BTC_revive_time_min = 5; BTC_revive_time_max = 240; BTC_who_can_revive = ["Man"]; BTC_loop_check = 0; BTC_disable_respawn = 0; BTC_respawn_gear = 1; BTC_active_lifes = 1; BTC_lifes = 5; BTC_spectating = 2;//0 = disable; 1 = units group; 2 = side units; 3 = all units BTC_spectating_view = [0,0];//To force a view set the first number of the array to 1. The second one is the view mode: 0 = first person; 1 = behind the back; 2 = High; 3 = free BTC_s_mode_view = ["First person","Behind the back","High","Free"]; BTC_black_screen = 0;//Black screen + button while unconscious or action wheel and clear view BTC_action_respawn = 0;//if black screen is set to 0 you can choose if you want to use the action wheel or the button. Keep in mind that if you don't use the button, the injured player can use all the action, frag too.... BTC_camera_unc = 1; BTC_camera_unc_type = ["Behind the back","High","Free"]; BTC_respawn_time = 0; BTC_active_mobile = 1;//Active mobile respawn (You have to put in map the vehicle and give it a name. Then you have to add one object per side to move to the mobile (BTC_base_flag_west,BTC_base_flag_east) - (1 = yes, 0 = no)) BTC_mobile_respawn = 1;//Active the mobile respawn fnc (1 = yes, 0 = no) BTC_mobile_respawn_time = 30;//Secs delay for mobile vehicle to respawn BTC_need_first_aid = 1;//You need a first aid kit to revive (1 = yes, 0 = no) BTC_pvp = 0; //(disable the revive option for the enemy) BTC_injured_marker = 1; BTC_3d_can_see = ["Man"]; BTC_3d_distance = 30; BTC_3d_icon_size = 0.5; BTC_3d_icon_color = [1,0,0,1]; BTC_dlg_on_respawn = 1;//1 = Mobile only - 2 Leader group and mobile - 3 = Units group and mobile - 4 = All side units and mobile BTC_objects_actions_west = [bTC_base_flag_west]; BTC_objects_actions_east = [bTC_base_flag_east]; BTC_objects_actions_guer = []; BTC_objects_actions_civ = []; if (isServer) then { BTC_vehs_mobile_west = [hunter];//Editable - define mobile west BTC_vehs_mobile_west = [hunter1];//Editable - define mobile west BTC_vehs_mobile_west = [hunter2];//Editable - define mobile west BTC_vehs_mobile_west = [hunter3];//Editable - define mobile west BTC_vehs_mobile_east = [mobile_east_0];//Editable - define mobile east BTC_vehs_mobile_guer = [mobile_guer_0];//Editable - define mobile independent BTC_vehs_mobile_civ = [mobile_civ_0];//Editable - define mobile civilian }; ////////////////// Don't edit below \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ if (!isDedicated) then {}; //FNC call compile preprocessFile "=BTC=_revive\=BTC=_functions.sqf"; if (isServer) then { //Mobile BTC_vehs_mobile_west_str = [];BTC_vehs_mobile_east_str = [];BTC_vehs_mobile_guer_str = [];BTC_vehs_mobile_civ_str = []; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_west != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_west) - 1) do {_veh = (BTC_vehs_mobile_west select _i);_var = str (_veh);BTC_vehs_mobile_west_str = BTC_vehs_mobile_west_str + [_var];_veh setVariable ["BTC_mobile_west",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_west"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_west;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_east != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_east) - 1) do {_veh = (BTC_vehs_mobile_east select _i);_var = str (_veh);BTC_vehs_mobile_east_str = BTC_vehs_mobile_east_str + [_var];_veh setVariable ["BTC_mobile_east",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_east"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_east;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_guer != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_guer) - 1) do {_veh = (BTC_vehs_mobile_guer select _i);_var = str (_veh);BTC_vehs_mobile_guer_str = BTC_vehs_mobile_guer_str + [_var];_veh setVariable ["BTC_mobile_guer",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_guer"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_guer;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_civ != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_civ) - 1) do {_veh = (BTC_vehs_mobile_civ select _i);_var = str (_veh);BTC_vehs_mobile_civ_str = BTC_vehs_mobile_civ_str + [_var];_veh setVariable ["BTC_mobile_civ",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_civ"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_civ;}; if (BTC_active_mobile == 1) then {publicVariable "BTC_vehs_mobile_west_str";publicVariable "BTC_vehs_mobile_east_str";publicVariable "BTC_vehs_mobile_guer_str";publicVariable "BTC_vehs_mobile_civ_str";}; // BTC_killed_pveh = [];publicVariable "BTC_killed_pveh"; BTC_drag_pveh = [];publicVariable "BTC_drag_pveh"; BTC_carry_pveh = [];publicVariable "BTC_carry_pveh"; BTC_marker_pveh = [];publicVariable "BTC_marker_pveh"; BTC_load_pveh = [];publicVariable "BTC_load_pveh"; BTC_pullout_pveh = [];publicVariable "BTC_pullout_pveh"; if (BTC_r_new_system == 1) then { BTC_anim_pveh = [];publicVariable "BTC_anim_pveh"; BTC_cpr_pveh = [];publicVariable "BTC_cpr_pveh"; BTC_ban_pveh = [];publicVariable "BTC_ban_pveh"; BTC_med_pveh = [];publicVariable "BTC_med_pveh"; }; }; if (isDedicated) exitWith {}; BTC_dragging = false; BTC_respawn_cond = false; //Init [] spawn { waitUntil {!isNull player}; waitUntil {player == player}; "BTC_drag_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_carry_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_marker_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_load_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_pullout_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_killed_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; BTC_r_mobile_selected = objNull; BTC_r_bleeding = 0; BTC_r_bleeding_loop = false; player addRating 9999; BTC_r_list = []; BTC_side = playerSide; BTC_r_s_cam_view = [-15,-15,15]; BTC_respawn_marker = format ["respawn_%1",playerSide]; if (BTC_respawn_marker == "respawn_guer") then {BTC_respawn_marker = "respawn_guerrila";}; if (BTC_respawn_marker == "respawn_civ") then {BTC_respawn_marker = "respawn_civilian";}; BTC_r_base_spawn = "Land_HelipadEmpty_F" createVehicleLocal getMarkerPos BTC_respawn_marker; if (BTC_r_new_system == 0) then { player addEventHandler ["Killed", BTC_player_killed];if (BTC_respawn_gear == 1) then {player addEventHandler ["HandleDamage", BTC_fnc_handledamage_gear];}; } else { "BTC_cpr_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_ban_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_med_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; "BTC_anim_pveh" addPublicVariableEventHandler BTC_fnc_PVEH; player setVariable ["BTC_r_status",[0,0,0,0,0],true]; player addEventHandler ["HandleDamage", BTC_fnc_handledamage]; player addEventHandler ["Killed", BTC_eh_killed]; BIS_fnc_healthEffects_handleDamage_code = {}; BIS_fnc_healtEffects_init = {}; BTC_r_action_menu = true; BTC_r_med_effect = false; BTC_is_bleeding = false; enableCamShake true; BTC_r_unc = false; BTC_r_unc_loop = false; BTC_r_damage = 0; BTC_r_head = 0; BTC_r_damage_legs = 0; BTC_r_damage_hands = 0; BTC_r_hit = 0; }; player setVariable ["BTC_need_revive",0,true]; //{_x setVariable ["BTC_need_revive",0,true];} foreach allunits;//[] spawn {while {true} do {sleep 0.1;player sidechat format ["%1",BTC_r_mobile_selected];};}; if (BTC_pvp == 1) then {player setVariable ["BTC_revive_side",str (BTC_side),true];}; player setVariable ["BTC_dragged",0,true]; if (BTC_r_new_system == 0) then {if ([player] call BTC_is_class_can_revive) then {player addAction [("<t color=""#ED2744"">") + ("First aid") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_first_aid], 8, true, true, "", "[] call BTC_check_action_first_aid"];};} else {player addAction [("<t color=""#ED2744"">") + ("Medical unit check") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_check_unit_state], 8, true, false, "", "[] call BTC_check_action_unit_state"];player addAction [("<t color=""#ED2744"">") + ("Check yourself") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[player],BTC_check_unit_state], -8, false, false, "", "BTC_r_action_menu && format [""%1"",player getVariable ""BTC_need_revive""] == ""0"" && vehicle player == player"];}; player addAction [("<t color=""#ED2744"">") + ("Drag") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_drag], 8, true, true, "", "[] call BTC_check_action_drag"]; player addAction [("<t color=""#ED2744"">") + ("Carry") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_carry], 8, true, true, "", "[] call BTC_check_action_drag"]; player addAction [("<t color=""#ED2744"">") + ("Pull out injured") + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_pull_out], 8, true, true, "", "[] call BTC_pull_out_check"]; if (BTC_active_mobile == 1) then { switch (true) do { case (BTC_side == west) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_west;} foreach BTC_vehs_mobile_west_str;}; case (BTC_side == east) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_east;} foreach BTC_vehs_mobile_east_str;}; case (str (BTC_side) == "guer") : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_guer;} foreach BTC_vehs_mobile_guer_str;}; case (BTC_side == civilian) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_civ;} foreach BTC_vehs_mobile_civ_str;}; }; } else { BTC_vehs_mobile_west_str = [];BTC_vehs_mobile_east_str = [];BTC_vehs_mobile_guer_str = [];BTC_vehs_mobile_civ_str = []; }; BTC_gear = [player] call BTC_get_gear; if (BTC_loop_check == 1) then {[] spawn BTC_revive_loop;}; if (({player isKindOf _x} count BTC_3d_can_see) > 0) then {if (BTC_pvp == 1) then {_3d = [] spawn BTC_3d_markers_pvp;} else {_3d = [] spawn BTC_3d_markers;};}; //[] spawn {while {true} do {sleep 0.5;hintSilent format ["%1",BTC_gear];};}; BTC_revive_started = true; //hint "REVIVE STARTED"; }; I copied the mobile respawn west and just added the different names, but only the last one is recognized. Edited March 14, 2014 by mech79 Share this post Link to post Share on other sites
giallustio 770 Posted March 14, 2014 BTC_vehs_mobile_west = [hunter,hunter1,hunter2]; u're just re-defining in that way. It has to be an array Share this post Link to post Share on other sites
mech79 10 Posted March 15, 2014 Ok I will try that thanks. Share this post Link to post Share on other sites
vrakpant 11 Posted March 15, 2014 I have tried searching for it, but I can't seem to find any solution to my problem. But whenever I get killed, I get an error saying "Resoursce BTC_spectating_dialog not found. And I can not for the life of me identify the problem. Even when I copy the =BTC= Revive off of other missions, where it does work, including details such as MHQ-names, init.sqf and description.ext, I still get errors having to do with dialogs. I am running a mission on the Takistan map, using several mods, including ALiVE and the rest being other armies, vehicles and weapons. Any suggestions? What lines should I look at in order to attempt to diagnose the problem? Share this post Link to post Share on other sites
Azza276 25 Posted March 18, 2014 Yeah, I've been seeing a similar issue to flyingcoyotus. Also I have an issue where when I respawn, I respawn in the place I died, not at the respawn_west, and when I respawn I am prone and cannot stand up or crouch. I can't even heal. Put the same respawn parameters into the previous release, not a problem. So nothing on this? Are you looking into it, have I got something wrong? are you able to replicate? do you need more info? I'd like to use the latest BTC (although not necessary at the moment) but this issue breaks it for me. Can you please look into it or at least update use on any progress you have made. Cheers Azza Share this post Link to post Share on other sites
giallustio 770 Posted March 18, 2014 Sure, when i get time Share this post Link to post Share on other sites
terminus 0 Posted March 19, 2014 Thanks for a great Script. I have one problem that I need help with. I call my hunter MHQN and then in the =BTC=_revive_init.sqf I have: BTC_vehs_mobile_west = [MHQN] Yet when I run the mission it says at start "vehicle _158 is available" and on the map it says "vehicle _158 is deployed" and the flag says "move to mobile vehicle_158".The function of spawning to or moving to vehicle works fine. Just want it to reflect the name given. Any idea what I'm doing wrong ? Share this post Link to post Share on other sites
Azza276 25 Posted March 21, 2014 Sure, when i get time Thankyou Share this post Link to post Share on other sites
Kabs 10 Posted March 21, 2014 (edited) Hello together, atm i am trying to add a function for giving points to medics wich have revived someone. As i am not so good with coding maybe someone can help me out. I would definately give regards for my project. so here comes the facts: some base code of how player makes points on kills. ScriptName "server\onplayerkilled.sqf"; if (isServer) then { [format ["server\onplayerkilled.sqf %1",_this]] execVM "debug.sqf"; PRIVATE ["_killed","_killer","_killedside","_killerside","_points","_killerunit"]; _killed = _this select 0; _killer = _this select 1; _killedside = _this select 2; _points = 1; if (_killedside == SIDE_WEST) then {EGES = (EGES + _points);PublicVariable "EGES";}; if (_killedside == SIDE_EAST) then {WGES = (WGES + _points);PublicVariable "WGES";}; if ((alive _killer) && (_killer != _killed)) then { if ((side _killer) == west) then {_killerside = SIDE_WEST;}; if ((side _killer) == east) then {_killerside = SIDE_EAST;}; if ((_killedside == _killerside) && (_killerside != SIDE_CIV) && ((count (crew _killer))>0)) then { _killerunit = ((crew _killer) select 0); [] call compile format ["%1SCORE = %1SCORE - %2;PublicVariable ""%1SCORE"";",(vehiclevarname _killerunit),_points]; }; if ((_killedside != _killerside) && ((count (crew _killer))>0)) then { _killerunit = ((crew _killer) select 0); [] call compile format ["%1SCORE = %1SCORE + %2;PublicVariable ""%1SCORE"";",(vehiclevarname _killerunit),_points]; }; }; }; this i want to have a similar function for the stiuation ive someone revived. a look here in the BTC_first_aid.sqf where i want the point for the reviver to get. if (Alive player) then it would be great if someone can help me out here since i am really stucked. greetz and thanks in advance Kabs Edited March 21, 2014 by Kabs Share this post Link to post Share on other sites
[kh]jman 49 Posted March 21, 2014 (edited) I am trying to add a function for giving points to medics which have revived someone. in =BTC=_revive\=BTC=_functions.sqf Insert after line 350 which is: _injured setVariable ["BTC_need_revive",0,true]; if (group player == group _injured) then { addToScore = [player, 1]; publicVariable "addToScore"; ["ScoreBonus", ["Revived a fellow soldier.", "1"]] call bis_fnc_showNotification; } else { addToScore = [player, 2]; publicVariable "addToScore"; ["ScoreBonus", ["Revived a squad member.", "2"]] call bis_fnc_showNotification; }; description.ext Insert class ScoreBonus in class CfgNotifications or create as below: class CfgNotifications { class ScoreBonus { title = "SCORE BONUS"; description = "%1"; iconPicture = "notificons\score_bonus.paa"; iconText = "+%2"; color[] = {0.38, 0.81, 0.16, 1}; priority = 5; }; } init.sqf Add the following to the bottom of init.sqf: if (isDedicated) exitWith { "addToScore" addPublicVariableEventHandler { ((_this select 1) select 0) addScore ((_this select 1) select 1); }; }; Finally, download score_bonus.paa, create a directory in your mission called notificons and copy to it. ---------- Post added at 23:39 ---------- Previous post was at 22:59 ---------- Thanks for a great Script.I have one problem that I need help with. I call my hunter MHQN and then in the =BTC=_revive_init.sqf I have: BTC_vehs_mobile_west = [MHQN] Yet when I run the mission it says at start "vehicle _158 is available" and on the map it says "vehicle _158 is deployed" and the flag says "move to mobile vehicle_158".The function of spawning to or moving to vehicle works fine. Just want it to reflect the name given. Any idea what I'm doing wrong ? in =BTC=_revive\=BTC=_revive_init.sqf Line 40. Insert before: if (isServer) then BTC_mobile_name_west = "mobile respawn west"; // this will be displayed to the player in revive dialogs and the map marker BTC_mobile_name_east = "mobile respawn east"; BTC_mobile_name_guer = "mobile respawn guerilla"; BTC_mobile_name_civ = "mobile respawn civilian"; in =BTC=_revive\=BTC=_revive_init.sqf Line 55. Replace: BTC_vehs_mobile_west_str = [];BTC_vehs_mobile_east_str = [];BTC_vehs_mobile_guer_str = [];BTC_vehs_mobile_civ_str = []; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_west != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_west) - 1) do {_veh = (BTC_vehs_mobile_west select _i);_var = str (_veh);BTC_vehs_mobile_west_str = BTC_vehs_mobile_west_str + [_var];_veh setVariable ["BTC_mobile_west",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_west"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_west;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_east != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_east) - 1) do {_veh = (BTC_vehs_mobile_east select _i);_var = str (_veh);BTC_vehs_mobile_east_str = BTC_vehs_mobile_east_str + [_var];_veh setVariable ["BTC_mobile_east",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_east"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_east;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_guer != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_guer) - 1) do {_veh = (BTC_vehs_mobile_guer select _i);_var = str (_veh);BTC_vehs_mobile_guer_str = BTC_vehs_mobile_guer_str + [_var];_veh setVariable ["BTC_mobile_guer",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_guer"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_guer;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_civ != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_civ) - 1) do {_veh = (BTC_vehs_mobile_civ select _i);_var = str (_veh);BTC_vehs_mobile_civ_str = BTC_vehs_mobile_civ_str + [_var];_veh setVariable ["BTC_mobile_civ",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_civ"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_civ;}; if (BTC_active_mobile == 1) then {publicVariable "BTC_vehs_mobile_west_str";publicVariable "BTC_vehs_mobile_east_str";publicVariable "BTC_vehs_mobile_guer_str";publicVariable "BTC_vehs_mobile_civ_str";}; With: BTC_vehs_mobile_west_str = [];BTC_vehs_mobile_east_str = [];BTC_vehs_mobile_guer_str = [];BTC_vehs_mobile_civ_str = []; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_west != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_west) - 1) do {_veh = (BTC_vehs_mobile_west select _i); _var = BTC_mobile_name_west; BTC_vehs_mobile_west_str = BTC_vehs_mobile_west_str + [_var];_veh setVariable ["BTC_mobile_west",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_west"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_west;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_east != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_east) - 1) do {_veh = (BTC_vehs_mobile_east select _i); _var = BTC_mobile_name_east; BTC_vehs_mobile_east_str = BTC_vehs_mobile_east_str + [_var];_veh setVariable ["BTC_mobile_east",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_east"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_east;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_guer != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_guer) - 1) do {_veh = (BTC_vehs_mobile_guer select _i); _var = BTC_mobile_name_guer; BTC_vehs_mobile_guer_str = BTC_vehs_mobile_guer_str + [_var];_veh setVariable ["BTC_mobile_guer",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_guer"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_guer;}; if (BTC_active_mobile == 1 && count BTC_vehs_mobile_civ != 0) then {for "_i" from 0 to ((count BTC_vehs_mobile_civ) - 1) do {_veh = (BTC_vehs_mobile_civ select _i); _var = BTC_mobile_name_civ; BTC_vehs_mobile_civ_str = BTC_vehs_mobile_civ_str + [_var];_veh setVariable ["BTC_mobile_civ",_var,true];if (BTC_mobile_respawn == 1) then {_resp = [_veh,_var,"BTC_mobile_civ"] spawn BTC_vehicle_mobile_respawn;};};} else {{deleteVehicle _x} foreach BTC_vehs_mobile_civ;}; if (BTC_active_mobile == 1) then {publicVariable "BTC_vehs_mobile_west_str";publicVariable "BTC_vehs_mobile_east_str";publicVariable "BTC_vehs_mobile_guer_str";publicVariable "BTC_vehs_mobile_civ_str";}; in =BTC=_revive\=BTC=_revive_init.sqf Line 107. Replace: switch (true) do { case (BTC_side == west) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_west;} foreach BTC_vehs_mobile_west_str;}; case (BTC_side == east) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_east;} foreach BTC_vehs_mobile_east_str;}; case (str (BTC_side) == "guer") : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_guer;} foreach BTC_vehs_mobile_guer_str;}; case (BTC_side == civilian) : {{private ["_veh"];_veh = _x;_spawn = [_x] spawn BTC_mobile_marker;{_x addAction [("<t color=""#ED2744"">") + ("Move to mobile " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]];} foreach BTC_objects_actions_civ;} foreach BTC_vehs_mobile_civ_str;}; }; With: switch (true) do { case (playerSide == west) : { { private ["_veh"]; _veh = _x; diag_log format["_x: %1, typename _x: %2",_x, typename _x]; _spawn = [_x] spawn BTC_mobile_marker; { diag_log format["_x: %1, typename _x: %2",_x, typename _x]; _x addAction [("<t color=""#0099FF"">") + ("Move to " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]]; } foreach BTC_objects_actions_west; } foreach BTC_vehs_mobile_west_str; }; case (playerSide == east) : { { private ["_veh"]; _veh = _x; _spawn = [_x] spawn BTC_mobile_marker; { _x addAction [("<t color=""#ED2744"">") + ("Move to " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]]; } foreach BTC_objects_actions_east; } foreach BTC_vehs_mobile_east_str; }; case (playerSide == resistance) : { { private ["_veh"]; _veh = _x; diag_log format["_x: %1, typename _x: %2",_x, typename _x]; _spawn = [_x] spawn BTC_mobile_marker; { diag_log format["_x: %1, typename _x: %2",_x, typename _x]; _x addAction [("<t color=""#22ad2c"">") + ("Move to " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]]; } foreach BTC_objects_actions_guer; } foreach BTC_vehs_mobile_guer_str; }; case (playerSide == civilian) : { { private ["_veh"]; _veh = _x; _spawn = [_x] spawn BTC_mobile_marker; {_x addAction [("<t color=""#FFFF22"">") + ("Move to " + _veh) + "</t>","=BTC=_revive\=BTC=_addAction.sqf",[[_veh],BTC_move_to_mobile], 8, true, true, "", format ["[""%1""] call BTC_mobile_check",_veh]]; } foreach BTC_objects_actions_civ; } foreach BTC_vehs_mobile_civ_str; }; }; in =BTC=_revive\=BTC=_functions.sqf Line 759. BTC_move_to_mobile Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";}; case (BTC_side == east) : {_side = "BTC_mobile_east";}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";}; case (playerSide == east) : {_side = "BTC_mobile_east";}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";}; }; in =BTC=_revive\=BTC=_functions.sqf Line 787. BTC_mobile_marker Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";}; case (BTC_side == east) : {_side = "BTC_mobile_east";}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";}; case (playerSide == east) : {_side = "BTC_mobile_east";}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";}; }; in =BTC=_revive\=BTC=_functions.sqf Line 827. BTC_mobile_check Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";}; case (BTC_side == east) : {_side = "BTC_mobile_east";}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";}; case (playerSide == east) : {_side = "BTC_mobile_east";}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";}; }; in =BTC=_revive\=BTC=_functions.sqf Line 929. BTC_r_get_list Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (BTC_side == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (playerSide == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; in =BTC=_revive\=BTC=_functions.sqf Line 970. BTC_r_load Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (BTC_side == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (playerSide == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; in =BTC=_revive\=BTC=_functions.sqf Line 1078. BTC_r_change_target Replace: switch (true) do { case (BTC_side == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (BTC_side == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (str(BTC_side) == "guer") : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (str(BTC_side) == "civ") : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; With: switch (true) do { case (playerSide == west) : {_side = "BTC_mobile_west";_array = BTC_vehs_mobile_west_str;}; case (playerSide == east) : {_side = "BTC_mobile_east";_array = BTC_vehs_mobile_east_str;}; case (playerSide == resistance) : {_side = "BTC_mobile_guer";_array = BTC_vehs_mobile_guer_str;}; case (playerSide == civilian) : {_side = "BTC_mobile_civ";_array = BTC_vehs_mobile_civ_str;}; }; Edited March 22, 2014 by [KH]Jman Share this post Link to post Share on other sites
mech79 10 Posted March 22, 2014 I am trying to move the respawn as triggers are activated. I have tried the script below with no luck. Is there a way in the revive script to use the respawn modules which I can sync to triggers or a way to place markers as needed? Had a look at the new system and it looks cool, but its hard to say more at this stage =)I'm also running into a problem when I try and move the respawn marker. I use the following in a script that is executed upon task complete in a trigger: respawnPos = getMarkerPos "respawn1"; publicVariable "respawnPos"; "Respawn_west" setMarkerPos RespawnPos; so I can give the updated marker to JiP players. but we always seem to spawn at the original place of Respawn_west, even the non-JiP players. or do you have a built-in way to enable / disable respawn positions that I don't know of? Share this post Link to post Share on other sites
Kabs 10 Posted March 22, 2014 Jman;2649716']in =BTC=_revive\=BTC=_functions.sqfInsert after line 350 which is: _injured setVariable ["BTC_need_revive"' date=0,true]; if (group player == group _injured) then { addToScore = [player, 1]; publicVariable "addToScore"; ["ScoreBonus", ["Revived a fellow soldier.", "1"]] call bis_fnc_showNotification; } else { addToScore = [player, 2]; publicVariable "addToScore"; ["ScoreBonus", ["Revived a squad member.", "2"]] call bis_fnc_showNotification; }; description.ext Insert class ScoreBonus in class CfgNotifications or create as below: class CfgNotifications { class ScoreBonus { title = "SCORE BONUS"; description = "%1"; iconPicture = "notificons\score_bonus.paa"; iconText = "+%2"; color[] = {0.38, 0.81, 0.16, 1}; priority = 5; }; } init.sqf Add the following to the bottom of init.sqf: if (isDedicated) exitWith { "addToScore" addPublicVariableEventHandler { ((_this select 1) select 0) addScore ((_this select 1) select 1); }; }; Finally, download score_bonus.paa, create a directory in your mission called notificons and copy to it. Thanks Jman, that worked well ! i wrote u a pm btw ;) Share this post Link to post Share on other sites
Desrat 0 Posted March 24, 2014 any reason people can think that respawn isn't working for me.. I'm using v0.97 with ALivE/CBA, the revive is in my mission in a mostly unedited state (I've only removed other faction objects/respawns by leaving an empty array), I've placed and named a mobile respawn vehicle(mobile_west_0), i've placed and named an object(BTC_base_flag_west), I've placed and named a marker(respawn_west), I've got the init call in place (regular, not lite) and the respawn and include entries in description.ext. Now other features seem to work, I can teleport to mobile from the flag and when I get killed I get the spectator dialog, but when I hit respawn I'm not getting the respawn dialog (i.e choose from base/mobile) and my character simply awakes on the floor where I died unable to stand or interact with anything (although I can crawl) NOTE: Having just tested the included default mission (switching the init call to the regular version from lite) the same happens, so is this a bug with the regular version? Share this post Link to post Share on other sites
L33CHW33D 10 Posted March 26, 2014 I have a question or two. Yes I have tried searching through all 122 pages of this thread. So I'm testing the newest version of Revive. I've got all the scripts moved over into my mission folder WHICH is an MP mission which I am previewing. We are using PG Services which are independent. Q1 - Does it need to exported to MP Missions for it to work or can you just preview it as a WIP MP Mission and it will work? My understanding is YES it can be done in MP Preview The mobile respawns and the base respawn all work great. Q2 - With or without a firstaid kit (even though I have it enabled) I cannot (or my friend who is online on my hosted server) revive anyone. It doesn't give me the option to or him. Q3 - Is there a way to set limited respawns (say 2) and revives based only on how many first kits are available to use on the healer and the wounded? Encourage team-work but allow a respawn if necessary. Q4 - Whenever I die, as host I have to lay there and wait until my timer runs out (btw the timer flickers on me.. anyone else have that problem? No doubt its my POS computer). Whenever my friend dies he can move his camera around and turn around. Can I just set everything black so when you die you lay there in darkness with no options do anything? For everything. It's curious how he can do things but I cannot. Drag and carry work (though carry is glitchy looking so I don't use it). Last question. Q5 - Whenever someone is wounded like my friend, even after he heals himself it still gives him a marker saying he's wounded and gives me the option to drag him or carry him.. even pull him out of vehicles. Should I just dump the scripts and start over.. maybe something got broken? Share this post Link to post Share on other sites
Vasilyevich 20 Posted March 29, 2014 (edited) - snip - Edited March 29, 2014 by Vasilyevich Share this post Link to post Share on other sites
jdmt 12 Posted March 29, 2014 any reason people can think that respawn isn't working for me..I'm using v0.97 with ALivE/CBA, the revive is in my mission in a mostly unedited state (I've only removed other faction objects/respawns by leaving an empty array), I've placed and named a mobile respawn vehicle(mobile_west_0), i've placed and named an object(BTC_base_flag_west), I've placed and named a marker(respawn_west), I've got the init call in place (regular, not lite) and the respawn and include entries in description.ext. Now other features seem to work, I can teleport to mobile from the flag and when I get killed I get the spectator dialog, but when I hit respawn I'm not getting the respawn dialog (i.e choose from base/mobile) and my character simply awakes on the floor where I died unable to stand or interact with anything (although I can crawl) NOTE: Having just tested the included default mission (switching the init call to the regular version from lite) the same happens, so is this a bug with the regular version? I'm having this exact same problem, I've triple checked everything too. Share this post Link to post Share on other sites
Firebird49th 10 Posted March 29, 2014 I'm having this exact same problem, I've triple checked everything too. I'm having the exact same issues with the example mission. I switched from lite to normal BTC in init.sqf as suggested. Apart from waking up on the floor instead of respawning I have following issues in the pure demo-mission: - No revive possible for teammates (only Carry/Drag). - No stand-up possible when respawning on the death place by hitting "respawn" button. - No respawn per action possible Tested in a gaming server environment (no dedicated). Basically in normal (not lite) mode the script seems totally broken. No revive by others possible, no respawn button working. The only thing you can do is have the 600 (or whatever seconds u have) countdown and then use the appearing menu to respawn at base / mobile. The lite mode doesn't offer the same functionality. Is there any previous version available? They seem to have worked pretty well. If anyone has them, that would be great. @Giallustio: Any chance to fix the current release or make previous best-of-versions available? I understand it is a time consuming thing. Any help in getting the normal version to run is highly appreciated. Cheers, FB Share this post Link to post Share on other sites
DrAbodoviC 10 Posted March 29, 2014 Apparently I'm not the only one facing problems. Giallustio, please we need a fix. Appreciate your hard work Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted March 29, 2014 (edited) I have a 0.95 version that works quite well ... I'll see if I can't prod 0.97 into working today though .. seems there might be an issue with BTC_player_killed in =BTC=_functions.sqf. EDIT: 0.97 isn't really ready for stable release. There are some issues with it still, and the removal of the 'new system' is only partial. ie. 0.97 =BTC=_revive_init.sqf line 101 My first round of tests with 0.97 resulted in irreversible case of disableUserInput true; and subsequent Alt+F4s. So I look at line 101, and there are still some calls for 'new system' functions. if (BTC_r_new_system == 0) then {if ([player] call BTC_is_class_can_revive) then {player addAction [("<t color=""#ED2744"">") + ("First aid") + "</t>","scripts\=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_first_aid], 8, true, true, "", "[] call BTC_check_action_first_aid"];};} else {player addAction [("<t color=""#ED2744"">") + ("Medical unit check") + "</t>","scripts\=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_check_unit_state], 8, true, false, "", "[] call BTC_check_action_unit_state"];player addAction [("<t color=""#ED2744"">") + ("Check yourself") + "</t>","scripts\=BTC=_revive\=BTC=_addAction.sqf",[[player],BTC_check_unit_state], -8, false, false, "", "BTC_r_action_menu && format [""%1"",player getVariable ""BTC_need_revive""] == ""0"" && vehicle player == player"];}; I couldn't get the First Aid addaction in my test of 0.97. so I shorten it to: if ([player] call BTC_is_class_can_revive) then { player addAction [("<t color=""#ED2744"">") + ("First aid") + "</t>","scripts\=BTC=_revive\=BTC=_addAction.sqf",[[],BTC_first_aid], 8, true, true, "", "[] call BTC_check_action_first_aid"]; }; With that, I can 'usually' get the First Aid addaction, although there are still inherent bugs I have to fix. - Stuck in first-person when down despite config changes. - First Aid option does not consistently appear. I do always get the Drag/Carry options though. - Carry seems to be partially broken. - Sometimes when revived, stuck in prone. - some config settings cause disableUserInput true; which require you to stop your game session (Alt+F4). eg. BTC_camera_unc = 0; // if = 1 then have to alt+F4 as cant respawn. either that or wait for revive or respawn timer. - ... I'll chip away at it, but will take some time. ... EDIT 2: So I got 0.97 somewhat functional. After doing so I've stopped using it and am using 0.95 again. Reason being that 0.97 has dropped Medkits as an optional requirement to revive, and I really don't feel like getting down and dirty with the coding required. Will reply in a day or two with dropbox links to both versions. Edited March 30, 2014 by MDCCLXXVI Share this post Link to post Share on other sites