Norrin's Revive Script (Recent Changes)

By norrin

Changes in 0.61

  • Script optimisations- Removed a great deal of unnecessary code from the core revive_player script and introduced a number of pre-processed functions to reduce the CPU overhead of the scripts.
  • Call for help option - When enabled allows an unconscious player to call for help from surrounding AI and players by pushing a button or the "H" key while unconscious.  Called AI will automatically move to the downed player unless they are already helping someone else.  Players will receive a hint that another player is calling for help.  This system works great if the automatic AI goto revive option is disabled as the group leader (the player) can specify when his AI should move to and heal a downed player (rather than them trying to heal someone in the middle of a fire fight), then if he is shot himself he can call for help.
  • Toggle dialog fade- Another new button in the unconscious dialog or the "B" key allows you to turn off the annoying dialog fade during the unconscious camera. The default setting is dialog fade off.
  • Other improvements to the unconscious camera - The camera no longer resets to the player's 3rd person view when a new dialog appears.  Automatically uses respwn point names when respawning at base rather than eg "base 1"
  • New information in unconscious camera- In connection with the other new features a lot more information is now displayed while units are unconscious such as who the current reviver is and there distance from the unconscious player, list of units that have been notified that you need help etc.
  • Free camera- Thanks to some code kindly provided by OFPEC (thankyou Hoz and Mandoble) there's now a free camera mode attached to the follow/free camera option - depress the right mouse button to move the camera and the mouse wheel zooms in and out.

Changes in .052

  • AI_Cover - If the AI goto revive option is enabled a second option can also be nebaled which will send a second AI unit to cover the reviver.
  • AI_aware -If this option is enabled the AI reviver will not move to revive a player until all known enemy units within 50 metres are killed. NB: this may add a considereable length of time to the time it takes an AI unit to revive.
  • Disable AI in the mission briefing -It is now possible to disable the AI in the mission briefing without causing errors
  • AI Dismount vehicles to revive - The AI will dismount Land vehicles if they are the closest units that can revive
  • AI Halt command override - The stop order will no longer prevent units from moving to revive
  • Base_1_respawn Array - The "Base_1_respawn " array allows you to set whether you would like to give the units the option of respawning at enemy occupied respawn points ie the 50 metre enemy unit radius does not apply. Each number of the array corresponds to each respawn point. A 0 stops players from respawning at enemy occupied spawns a 1 allows spawning eg. [1,0,0,0] - you can respawn at Base_1 even if enemy units are close by but you cannot spawn at the other bases if occupied by the enemy.
  • Queens Gambit Animations - You can now specify in the revive_init.sqf file whether you want to use the Queens Gambit unconscious animations just set _NORRN_QG_animation = 1; on line 78 of this file. By default this is set to 0
  • Top down camera height - There's now an option to set the top down camera height for the unconscious camera in the revive_init.sqf. Just change line 194 _NORRN_top_view_height = 20; to what ever height you want.
  • Mobile Spawn -I've updated the dialog code so that the mobile button only appears when its deployed - it will now dynamically update if the player adds or removes the mobile spawn while the player is unconscious.
  • Choose a respawn point if the revive timer elapses - I've also updated the player choose spawn point dialog if the revive timer elapses. A map now appears when the player is dead (which you can navigate around using the mouse and the scroll button) and when you choose a respawn point the map centres on the chosen respawn point and you can then press OK or go back if you change your mind.
  • Added Anti-Slope (terrain incline) code - There has been an ongoing bug in the code that occurred if a player died on a slope that could not be reached by other players. Thanks to suggestion by alef and a function from BIS' Warfare I have now introduced some code that detects whether the player has died on a slope too steep for other players to reach and then finds the closest space that the other players can reach and places the unconscious body there. The terrain slope differs if the HULK_r_prone dialog is used (it has to be less steep because of what it does) and this is automatically built into the code.
  • Fixed Mission end function - The screens now blacks out if all players are unconscious and the mission end function is enabled.