Made for ArmA 1.14 (1.09 and up should be ok)
Introduction
Being a revive script, this replaces respawning/no respawning - a middle ground.
The main idea is to limit respawning to ensure some way to lose a mission yet prevent players from
having to wait until the mission ends when not using respawn.
The way this is accomplished is by using respawn, but remove control from the player and wait until
an ai or other player uses an action on the helpless unit.
The main difference between this and other revive scripts is in persistancy. This is explained below.
If a unit dies, his status (position, equipment, revive status and penalty status) is
sent to the server for safekeeping.
Your status will also be saved at random intervals and after being revived.
This means that there is no point in rejoining the server unless there are other units available
who are still conscious.
Another benefit is that clients who crash can rejoin without losing too much progress.
Another important detail - you can't stand after being revived, so make sure you include
a medic in the mission.
Implemented Features
- Saving of status (automatic: on death/revive and at random intervals)
- Spectating in first person while unconscious at any distance
- Compatible with multiple sides (everyone can revive each other, but not spectate or see status)
- Automatic ending of mission once all connected units are down (Using End6 trigger)
- Optional AI support (AI units cannot move after being killed, user can initiate ai assistance)
- Sliding down steep slopes if unable to stand
- Heavy reliance on medics (units being heavily wounded and unable to stand after being revived)
- Carrying players (Buggy at the moment)
- Optional permadeath
- Penalties after being revived a few times (get to a hospital to remove the penalties)
- Compatible with hosted games and dedicated server
- Expandable, dialog-based action system (for reviving if there is no action, loading units into or
out of vehicles, ect)
Deliberately omitted features
- Respawning (for difficulty and teamplay reasons)
- Limited healing for units (reserved for medics to promote teamplay)
- Map markers (Aiming for solution without map clutter, possibly separate map dialog)
- Third person spectating options (exploitable, especially in pvp)
Planned Features
- Sounds (while waiting for revive, when randomly fainting etc)
- Dialog for checking nearby downed units, reviving when lack of action etc
- Invulnerability while unconscious
- Chance of dropping pistol/rifle magazine on revive
- Probably forgot something here
In-depth instructions
After biting the dust, you have the ability to spectate other allied revivable units.
To do this, click the units name in the list on the right.
You will then watch the world from that units perspective, and the distance and general direction
to your body will be displayed on the bottom of the screen.
To request ai assistance, doubleclick the text in the bottom right corner.
When coming across another unit in need of help, you should see an action "Revive <name>".
Use the action to revive the unit - this might take some time.
In case of viewblocking smoke, this action might not appear (working on backup solution).
After being revived 3 times, you will start suffering from occasional fainting.
The duration of the blackouts and the respite between each will respectively increase and decrease
every time you are revived (the default values are not set in stone, they are probably
way too evil - want feedback on this).
If on foot you will drop to the ground, if in a vehicle your screen will simply go dark and you will
not be able to control the vehicle for the duration of the blackout (try not to drive/fly).
When you start passing out, start looking for a field hospital.
Upon finding one, an action will be added to it, reading "Restore revives" - Use that to stop passing
out and get a new grace period of 3 revives.
Installation
- This revive system is based on unit names, so you'll have to name all your revivable units.
- Copy the HULK_REV folder to the root folder of your mission.
- Add the following to your init.sqf or init.sqs file:
[[unitname,unitname],["unitname","unitname"]] execVM "HULK_REV\run.sqf";
- Ensure that all the units you want to be able to be revived are added to the array,
unlisted players will not be able to play.
- The following settings are required in the description.ext:
respawn = "INSTANT";
respawndelay = 1;
disabledai = 0; //optional
#include "HULK_REV\config.cpp"
- Open HULK_REV\settings.sqf and set the sides parameter to match the mission settings.
- If you have vehicles or custom objects that should offer healing services, you can add the
following in its init line to allow players to restore their revive count with it:
object addAction ["Restore revives", "HULK_REV\revive.sqf","TRUEHEAL"];
- Add a debriefing entry for End6 in the mission briefing (for when all are down)
Known bugs
- Losing control of yourself after being revived by ai if spectating the reviver (not verified).
- Excessive friendly fire might prevent actions from showing.
- AI are not limited to crawling after being revived.
Credits
- My fellow IAST members for testing and suggestions, especially Delta38 and Zee
- Mandoble for his mando_angles and mando_getpos
- General Barron for the setPitchBank function
- Norrin for inspiring me revive script and some code in the cannot stand script
- The community in general
Changelog
0.71 Initial public version
0.72
- Made the option to carry a player stay even after being healed
- Fixed: the player would stand after dying if the ACE mod was used
- Made slight adjustments to the login system
- Removed unused picture overlay
- Added event system for custom code execution
- Added an expandable actions system through dialog (see feature list)
- Added setting for limiting who can revive
- Put the configuration file in a separate folder for simpler updates
0.73
- When looking for units to load into or unload from vehicles, script will consider ACE unconsciousness as well
- Passing out from trauma should happen less frequently
- Rewrote the prone script, you now have a limited capacity for moving upright (Fixes bug where
you're locked in between animations)
- Changed weapon selection function slightly
- Improved handling of changing ai locality
- Added an option for using this new ai support in settings.sqf
- Some adjustments related to changes in ACE 1.03 (local ruckmags and weapon on back)
- Fixed a bug where any ai could revive you even though only medics could revive
- Added lobby setting for choosing who can revive in the example mission
0.73B
- Fixed error in weapon selection function if the player lacked a primary weapon
0.74
- Fixed bug preventing you from loading units into or out of unnamed vehicles
- Fixed bug with reviving inside vehicles
- Fixed bug which caused you to never faint from trauma
- Added eventhandler to prevent repeated deaths when waiting for revive
- Fixed bug that made a carried unit appear sitting after being dropped for other clients
- Fixed bug that prevented units from reviving at field hospitals when "Only medics revive unassisted" was selected
- Added "Carry" action to Utilities menu
- Added "Restore revives at hospital" action to utilities menu.
- Added ability to use the dragging included in ACE (Utilities>Carry>Drag)
- Changed rucks and ruckmags dropping on the ground to being kept on the unit
- Unconscious units loaded into vehicles no longer use the standard cargo animation
- If ACEMOD is active their dragging method is used by default
- Added setting for disabling revive altogether
- Removed player name in front of most status messages
Notes to testers:
The script has been mostly tested in hosted games with limited players (less than 6).
I also haven't tested the AI support much, as that's a relatively new addition to the script.
So if any of you are able to test more large-scale and see how the server handles, that would be great (especially with AI).