Jump to content

Search the Community

Showing results for 'revive' in content posted by Larrow.


Didn't find what you were looking for? Try searching for:


More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 25 results

  1. ^^this. See \a3\functions_f_mp_mark\revive\defines.inc which you can include into your own scripts to access revive macros/state enumerations. These are likely the most useful from that file.
  2. No, the revive system is hard coded for the strings "FirstAidKit" and "Medikit". See \a3\functions_f_mp_mark\revive\defines.inc /*-------------------------------------------------------------------------------------------------- REQUIREMENTS --------------------------------------------------------------------------------------------------*/ #define CAN_USE_MEDIKIT(unit) (unit getUnitTrait "Medic" && {'Medikit' in items unit}) #define CAN_USE_MEDIKIT2(unit,target) (unit getUnitTrait "Medic" && {('Medikit' in items unit || {(!isNull target && {'Medikit' in items target})})}) #define CAN_USE_FAK(unit) ('FirstAidKit' in items unit) #define CAN_USE_FAK2(unit,target) ('FirstAidKit' in items unit || {(!isNull target && {'FirstAidKit' in items target})})
  3. They were removed when the whole revive system was rewritten, A3 1.62 2016 I believe. spotrep-00058
  4. Larrow

    Reducing player damage

    This is correct Revive adds a HandleDamage EH to the player. As per the wiki.. So all you should need to do is wait until the Revive HandleDamage EH has been applied.Remove the EH. Add your own that manipulates the damage recieved. Call the Revives HandleDamage function. Pass result back to engine at the end of the EH. Something like.. params[ "_unit" ]; //Exit if we are a player and not local //Otherwise add EH for AI every where just incase their locality //changes due to moving into a players group //the EH will only fire where the AI is local if ( isPlayer _unit && { !local _unit } ) exitWith {}; if ( isPlayer _unit ) then { //Waituntil REVIVE handleDamage EH has been applied waitUntil{ !isNil { _unit getVariable "bis_revive_ehDamage" } }; //Remove REVIVE HandleDamage EH _unit removeEventHandler[ "HandleDamage", _unit getVariable "bis_revive_ehDamage" ]; }; //Only damage from last applied handleDamage EH is taken into consideration by the engine //Apply a new EH so as we can override the damage applied _unit addEventHandler [ "HandleDamage", { params ["_unit", "_selection", "_damage","_source","","_index"]; systemChat format[ "Damage recieved: %1", _damage ]; //Do any other damage calculations here //_damage is the total damage the unit has for this selection once this EH returns //e.g lets change the damage recieved for each selection if ( _index > -1 ) then { private _selectionDamage = _unit getHit _selection; private _damageRecieved = (_damage - _selectionDamage) max 0; _damageRecieved = _damageRecieved / 4; _damage = _damageRecieved + _selectionDamage; }; systemChat format[ "Damage to REVIVE: %1", _damage ]; //Only players respond to REVIVE if ( isPlayer _unit ) then { _this set[ 2, _damage ]; //Call BI REVIVE HandleDamage EH passing new _damage value _damage = _this call BIS_fnc_reviveOnPlayerHandleDamage; }; systemChat format[ "Damage to engine: %1", _damage ]; _damage }]; systemChat format[ "Override REVIVE EH applied to %1", _unit ];Either in the initPlayerLocal or called from somewhere where you can pass the player in.Ive been over cautious with the player checks but you can quite easily remove them from the start of the script to apply this for AI as well and then the EH only applies Revive damage handling if its a player. EDIT: Changed the script so you can pass either a player or AI and it will apply the damage changes and handle Revive if its a player.
  5. Second script is working fine as i just test the original i gave you with the debug systemChats added back in. I think the problem is with the first, although you have allowDamage false revive still adds up the damage taken and likely applies it to the unit via setDamage which will bypass allowDamage false. Get rid of your first script and update the second to... params[ "_unit" ]; //Exit if we are a player and not local //Otherwise add EH for AI every where just incase their locality //changes due to moving into a players group //the EH will only fire where the AI is local if ( isPlayer _unit && { !local _unit } ) exitWith {}; if ( isPlayer _unit ) then { //Waituntil REVIVE handleDamage EH has been applied waitUntil{ !isNil { _unit getVariable "bis_revive_ehDamage" } }; //Remove REVIVE HandleDamage EH _unit removeEventHandler[ "HandleDamage", _unit getVariable "bis_revive_ehDamage" ]; }; //Only damage from last applied handleDamage EH is taken into consideration by the engine //Apply a new EH so as we can override the damage applied _unit addEventHandler [ "HandleDamage", { params ["_unit", "_selection", "_damage","_source","","_index"]; systemChat format[ "Damage recieved: %1", _damage ]; if ( lifeState _unit != "INCAPACITATED" ) then { //Do any other damage calculations here //_damage is the total damage the unit has for this selection once this EH returns //e.g lets change the damage recieved for each selection if ( _index > -1 ) then { private _selectionDamage = _unit getHit _selection; private _damageRecieved = (_damage - _selectionDamage) max 0; _damageRecieved = _damageRecieved / 4; _damage = _damageRecieved + _selectionDamage; }; //Only players respond to REVIVE if ( isPlayer _unit ) then { systemChat format[ "Damage to REVIVE: %1", _damage ]; _this set[ 2, _damage ]; //Call BI REVIVE HandleDamage EH passing new _damage value _damage = _this call BIS_fnc_reviveOnPlayerHandleDamage; }; }else{ _damage = 0; }; systemChat format[ "Damage to engine: %1", _damage ]; _damage }];Combining the two, this way the revive BIS_fnc_reviveOnPlayerHandleDamage is never called if the player is incapacitated so no damage for selections is saved.
  6. If using BIS Revive... Tested - Example Mission
  7. You can cut most of the script out as -ami- mofo also wanted to reduce damage across the board for all units. //initPlayerLocal.sqf params[ "_unit" ]; //Waituntil REVIVE handleDamage EH has been applied waitUntil{ !isNil { _unit getVariable "bis_revive_ehDamage" } }; //Remove REVIVE HandleDamage EH _unit removeEventHandler[ "HandleDamage", _unit getVariable "bis_revive_ehDamage" ]; //Only damage from last applied handleDamage EH is taken into consideration by the engine //Apply a new EH so as we can override the damage applied _unit addEventHandler [ "HandleDamage", { private[ "_damage" ]; params [ "_unit" ]; //If we are not incapacitated if ( lifeState _unit != "INCAPACITATED" ) then { //Get revives handle damage _damage = _this call BIS_fnc_reviveOnPlayerHandleDamage; }else{ //if we are incapacitated _damage = 0; }; _damage }]; Placed in the initPlayerLocal.sqf as revive only works on players. If they are not incapacitated then call the function revive uses to calculate damage otherwise just return 0 damage.
  8. Do it in damaged EH instead. The revive handleDamage works out what damage the unit will receive. The damage EH will receive applied damage, specifically on the Incapacitated hit point when going incapacitated. //initPlayerLoacl.sqf #include "\a3\functions_f_mp_mark\revive\fn_reviveinit.sqf" params[ "_player" ]; _player addEventHandler [ "Dammaged", { params[ "_unit", "", "_damage", "", "_hitPoint", "_source" ]; if ( _damage >= 1 && { REVIVE_ENABLED( _unit ) && { _hitPoint == "Incapacitated" }}) then { if (!IN_VEHICLE(_unit)) then { //Unit being set to incapacitated //Do what ever //Test: Tell everyone this unit has been incapacitated format[ "Unit: %1 incapacitated", name _unit ] remoteExec [ "hint", 0 ]; }; }; }]; Put through very little testing. Keep in mind this may change with the coming update, especially the in vehicle part, as I believe they have made some changes to the revive system.
  9. Make take some reading on your behalf but I'm sure you can find plenty of info from these threads... https://forums.bohemia.net/search/?&q=revive&author=Larrow Just take into account that there was a major rewrite of the revive system in 1.66 from memory, and some of these threads are maybe from before this, but should give you enough information to get you looking in the right place.
  10. Larrow

    Stopping Bleeding Out

    //#include "a3\functions_f_mp_mark\revive\defines.inc" //[ VAR_TRANSFER_STATE, STATE_REVIVED, player ] call BIS_fnc_reviveOnState; [ "#rev", 1, player ] call BIS_fnc_reviveOnState; I think that should handle it all for you, both setting damage to 0 and changing unconscious state, plus everything that is needed for the revive system.
  11. Revive is no longer a template. It has its own setting, either as described in previous posts from within the editor OR by following the description.ext setting found on the wikis Arma 3 Revive page. Oh I missed that, when did Zenimax buy out Bohemia Interactive
  12. Larrow

    BIS Revive with Spectator

    See this thread post onwards for the revive variables since the 1.56 rewrite. As far as I can remember the only templates that are compatible with Revive are menuPosition and menuInventory, all others are ignored.
  13. Would need looking into, as my posted script now does nothing for players being revived this will be an issue with BI revive scripts. As a fix it would involve, like the previous script, saving the players backpack and contents on killed && STATE_DOWNED and then in the respawn EH checking for STATE_INCAPACITATED and reapplying the backpack and contents. //initPlayerLocal.sqf #include "\a3\functions_f_mp_mark\Revive\defines.hpp" systemChat "Saving initial loadout"; //Save initial loadout [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; //Save loadout when ever we exit an arsenal [ missionNamespace, "arsenalClosed", { systemChat "Arsenal closed"; [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }] call BIS_fnc_addScriptedEventHandler; //Save backpack and items when killed player addEventHandler [ "Killed", { params[ "_unit", "_killer" ]; systemChat "Killed"; if ( GET_STATE( _unit ) isEqualTo STATE_DOWNED ) then { systemChat "Downed - saving backpack and contents"; _unit setVariable [ "backpack", backpack _unit ]; _unit setVariable [ "backpack_items", backpackItems _unit ]; }; }]; player addEventHandler [ "Respawn", { params[ "_unit", "_corpse" ]; systemChat "Respawning"; systemChat format[ "state %1", GET_STATE_STR(GET_STATE( _unit )) ]; switch ( GET_STATE( _unit ) ) do { case STATE_INCAPACITATED : { systemChat "Incapacitated"; _backpack = _corpse getVariable [ "backpack", "" ]; if !( _backpack isEqualTo "" ) then { systemChat "Fixing units backpack and items"; removeBackpackGlobal _unit; _unit addBackpackGlobal _backpack; _items = _corpse getVariable [ "backpack_items", [] ]; { _unit addItemToBackpack _x; }forEach _items; }; }; case STATE_RESPAWNED : { h = _unit spawn { params[ "_unit" ]; systemChat "Died or Respawned via menu"; _templates = []; { { _nul = _templates pushBackUnique _x; }forEach ( getMissionConfigValue [ _x, [] ] ); }forEach [ "respawntemplates", format[ "respawntemplates%1", str playerSide ] ]; sleep playerRespawnTime; if ( { "menuInventory" == _x }count _templates > 0 ) then { systemChat "Respawning - saving menu inventory"; [ _unit, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }else{ systemChat "Respawning - loading last saved"; [ _unit, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory; }; _unit setVariable [ "backpack", nil ]; _unit setVariable [ "backpack_items", nil ]; }; }; }; }];Untested..Although the fact backpack are not saving properly should be bought to BI's attention rather than work arounds like this.
  14. Seeing as you are making some improvements to the Revive system, any chance while you are there you could put some state change hooks in for us via BIS_fnc_callScriptedEventHandler? they used to exist before the rewrite in 1.56. Would just make handling state changes that much easier rather than having some scheduled code continually checking for state changes or having to remove your events and inserting our own with modifications that still call BI's functions.
  15. Of course, all relevant revive information is held locally for each client. That is why the original quoted code uses player, the local unit. [ "#rev", 1, _unit ] remoteExecCall ["BIS_fnc_reviveOnState",_unit]; Why remote execute a command to run a function, when you can just run the function?
  16. Thats extremely messy way though due to the macro whitespace. Try BIS_fnc_reviveInit and paste in IDE of choice. I always unpack the whole game so i can grep through the files, just though its a missing feature that would be extremely useful. What would be handy is having the files path selectable so you could then copyToClipboards loadfile "\a3\functions_f_mp_mark\revive\defines.inc" Or pass top 20 lines of file for #include's and add buttons to viewer title area that open a moveable text panel with included doc, then you could browse both the script and defines at the same time.
  17. With some of the current tweaks happening to the functions viewer, may I suggest a needed improvement. With the heavy usage of macros appearing in a lot of BI script nowadays some way to view included files - revive for example I'm looking at you. The functions viewer is current useless for reading some of these heavily macro'ed files, if you wish to know what is happening like all the namespace variables used etc. Currently the only way to make sense of these functions is to unpack the game PBOs.
  18. Just remove the revives hold action rather than looking for the keys/mouse button. Untested, something like.. See revised code below Most properly not correct but should give you a good idea where to look, especially the revive defines file.
  19. AllowDamage will not work as the revives handleDamage bypasses the normal damage routine by saving and adding up damage to hitPoints and then applying it manually with setDamage which does not trigger allowDamage. Using the handleDamage EH with 0 although it will stop damage as shown will likely also break revive as once revived it will override the damage EH as it will be the last handleDamage EH added, unless you store a reference to it and remove it once revived. See the script in this thread Here and just remove the damage reduction calculation.
  20. Some thing like... //initPlayerLocal.sqf #include "\a3\functions_f_mp_mark\Revive\defines.hpp" #define ALLOWED_REVIVIES 2 player addEventHandler [ "HandleDamage", { params[ "_unit", "_selectionName" ]; if ( _selectionName == "" ) then { diag_log str _this; _state = GET_STATE( player ); _h = _state spawn { params[ "_currentState" ]; //Wait frame for BI EHs to establish state waitUntil{ true }; diag_log format[ "Prev = %1", GET_STATE_STR( _currentState ) ]; diag_log format[ "New = %1", GET_STATE_STR( GET_STATE( player ) ) ]; //Are we are unconscious and were not already unconscious if ( IS_DISABLED( player ) && !( _currentState isEqualTo STATE_INCAPACITATED ) ) then { _revivesLeft = player getVariable[ "allowedRevives", ALLOWED_REVIVIES ]; if ( _revivesLeft > 0 ) then { //Wait until we are not unconscious waitUntil{ !IS_DISABLED( player ) }; //If we were revived if ( GET_STATE( player ) isEqualTo STATE_REVIVED ) then { //Decrease our allowed revivies player setVariable [ "allowedRevives", _revivesLeft - 1 ]; }; }else{ //Kill the player player setDamage 1; }; }; diag_log format[ "Done - remaining = %1", player getVariable[ "allowedRevives", ALLOWED_REVIVIES ] ]; }; }; }]; May need to fineness and you will need to handle respawns for how ever you have it set up.
  21. The whole things been rewritten for 1.56 From a few quick test you shouldn't need much more than this... //initPlayerLocal.sqf #include "\a3\functions_f_mp_mark\Revive\defines.hpp" systemChat "Saving initial loadout"; //Save initial loadout [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; //Save loadout when ever we exit an arsenal [ missionNamespace, "arsenalClosed", { systemChat "Arsenal closed"; [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }] call BIS_fnc_addScriptedEventHandler; player addEventHandler [ "Respawn", { systemChat "Respawning"; systemChat format[ "state %1", GET_STATE_STR(GET_STATE( player )) ]; if ( GET_STATE( player ) == STATE_RESPAWNED ) then { systemChat "Died or Respawned via menu"; _templates = []; { { _nul = _templates pushBackUnique _x; }forEach ( getMissionConfigValue [ _x, [] ] ); }forEach [ "respawntemplates", format[ "respawntemplates%1", str playerSide ] ]; if ( { "menuInventory" == _x }count _templates > 0 ) then { systemChat "Respawning - saving menu inventory"; [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }else{ h = [] spawn { sleep playerRespawnTime; systemChat "Respawning - loading last saved"; [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory; }; }; }else{ systemChat "Incapacitated"; }; }];The whole problem with Incapacitated state on saving/reapplying your gear seems to have been fixed.Have not test the menuInventory side of things as it is currently broken. Heres a hint showing some of the available variables and there values wrapped in a OEF. [ "OEFRevive", "onEachFrame", { _msg = "Unit States\n"; _msg = format[ "%1\nBroadcasts\n", _msg ]; { _msg = format [ " %1 %2 - %3\n ", _msg, _x, player getVariable [ _x, "nil" ] ]; }forEach [ VAR_TRANSFER_STATE, VAR_TRANSFER_FORCING_RESPAWN, VAR_TRANSFER_BEING_REVIVED ]; _msg = format[ "%1\nLocal\n", _msg ]; { _msg = format [ " %1 %2 - %3\n ", _msg, _x, player getVariable [ _x, "nil" ] ]; }forEach [ VAR_STATE, VAR_STATE_PREV, VAR_BEING_REVIVED, VAR_FORCING_RESPAWN, VAR_HELPER, VAR_DAMAGE, VAR_BLOOD ]; _msg = format[ "%1\nStates\n", _msg ]; { _msg = format [ " %1 %2 - %3\n ", _msg, _x select 0, _x select 1 ]; }forEach [ [ "STATE_RESPAWNED", STATE_RESPAWNED ], [ "STATE_REVIVED", STATE_REVIVED ], [ "STATE_INCAPACITATED", STATE_INCAPACITATED ], [ "STATE_DYING", STATE_DYING ], [ "STATE_DEAD", STATE_DEAD ], [ "STATE_DOWNED", STATE_DOWNED ] ]; hintSilent _msg; }] call BIS_fnc_addStackedEventHandler; Just run it somewhere in your initPlayerLocal.sqf as it needs the defines (included in script above) to work.
  22. This should satisfy all the conditions in the OP. I know you've likely solved this by now TB but thought I would post for completeness and of course to satisfy my OCD :D. //initPlayerLocal.sqf //small sleep to make sure any init loadouts have been applied //OR apply any default loadouts before this point sleep 1; //Save initial loadout [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; //Save loadout when ever we exit an arsenal [ missionNamespace, "arsenalClosed", { [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }] call BIS_fnc_addScriptedEventHandler; //When we revive [ missionNamespace, "reviveRevived", { _nul = _this spawn { _unit = _this select 0; _revivor = _this select 1; //if forced respawn or we bleed out if ( isNull _revivor ) then { //wait until player is actually respawned into alive state sleep playerRespawnTime; //Load last saved inventory [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory; }; }; } ] call BIS_fnc_addScriptedEventHandler; player addEventHandler [ "Killed", { //Save players loadout for if he is revived [ player, [ missionNamespace, "reviveInventory" ] ] call BIS_fnc_saveInventory; }]; player addEventHandler [ "Respawn", { if ( player getVariable [ "BIS_revive_incapacitated", false ] ) then { //Set correct loadout on incapacitated unit laying on floor in injured state //This is also the new unit if he is revived [ player, [ missionNamespace, "reviveInventory" ] ] call BIS_fnc_loadInventory; }; //Did we respawn from the menu if ( missionNamespace getVariable [ "menuRespawn", false ] ) then { [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory; missionNamespace setVariable [ "menuRespawn", false ]; }; }]; //If the respawn menu button is active if ( !isNumber( missionConfigFile >> "respawnButton" ) || { getNumber( missionConfigFile >> "respawnButton" ) > 0 } ) then { _respawnMenu = [] spawn { waitUntil { !isNull ( uiNamespace getVariable [ "RscDisplayMPInterrupt", displayNull ] ) }; uiNamespace getVariable "RscDisplayMPInterrupt" displayCtrl 1010 ctrlAddEventHandler [ "ButtonClick", { missionNamespace setVariable [ "menuRespawn", true ]; }]; }; };
  23. How about something like... //Check at mission start REVIVE_ACTIVE = false; _respawnTemplates = getArray( missionConfigFile >> "respawnTemplates" ); _sideTemplates = getArray( missionConfigFile >> ( "respawnTemplates" + str side player )); _playersTemplates = _respawnTemplates + _sideTemplates; { if ( "revive" == _x ) then { REVIVE_ACTIVE = true; }; }forEach _playersTemplates; //Adding some kind of respawn EH if ( REVIVE_ACTIVE ) then { [ missionNamespace, "reviveRevived", { params[ "_unit", "_revivor" ]; if ( isNull _revivor ) then { _nul = [] spawn { sleep playerRespawnTime; hint "You respawned"; }; }else{ hint format[ "You were revived by %1", name _revivor ]; }; }] call BIS_fnc_addScriptedEventHandler; }else{ player addEventHandler [ "Respawn", { hint "You respawned"; }]; };Although it does not catch respawns from the menu
  24. Some test code.. //initPlayerLocal.sqf //Save initial loadout [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; //Action to simulate saving loadout player addAction [ "Save Inventory", { [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }]; //Save loadout when ever we exit an arsenal [ missionNamespace, "arsenalClosed", { [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory; }] call BIS_fnc_addScriptedEventHandler; //When we revive [ missionNamespace, "reviveRevived", { _nul = _this spawn { _unit = _this select 0; _revivor = _this select 1; //This need something better to postpone loading inventory waitUntil { !( _unit in BIS_revive_units ) }; sleep 5; //if forced respawn if ( isNull _revivor ) then { [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory; }; }; } ] call BIS_fnc_addScriptedEventHandler; At the moment of death as you go into incapacitate state you can also find the units current loadout... [ missionNamespace, "reviveIncapacitated", { h = [] spawn { waitUntil { ( player getVariable [ "bis_revive_loadoutsaved", false ] ) }; _loadout = player getVariable [ "bis_fnc_saveinventory_data", [] ]; hint str _loadout; }; } ] call BIS_fnc_addScriptedEventHandler; But is cleared virtually instantly.Something to mess around with.
  25. This thread has some info that may help you in de-terminating when a player actually dies in the new BIS revive system.
×