Jump to content
Sign in to follow this  
A-SUICIDAL

MP Death Cam Script - with Sample Mission

Recommended Posts

After creating my own sqf Death Cam script recently, I've tweaked it to be a bit better and it will also now pan to the enemy that killed you. I feel pretty happy with it, so I wanted to share it with anybody who might be interested in using it.

I use it in coop missions that have respawn, but do not use revive. Normally in coop missions that do not use revive, when you die the screen just goes black for for how ever long the respawnDelay time is set to in the missions description.ext file - so all you see is darkness, the score chart and the time remaining before you respawn. Black screens suck, especially if the respawn time is long.

Wouldn't it be better to see yourself flop dead and hear some music, maybe have a couple of crows start to squawk as the camera moves up into the sky a little while looking down at you - then the camera pans to the enemy that killed you and stays on that enemy as the camera continues to move up into the sky even more - then everything fades to black - and all sounds come to a silence - suddenly the blackness turns back to light and you are now standing back at base in your spawn area.

Yeah, it's not really meant to be used in conjunction with revive scripts, but then again I never tested it with a revive script either. Sometimes I use revive in my missions and sometimes I don't. For the most part I prefer not to use revive because I like using my medkit script, so this death cam script really makes dying a lot less annoying - and... it's also nice to see who killed you - for those many times when you have no clue what it was that killed you. It would definitely give away the position of the player that killed you in a verses match, which some hosts might prefer, especially for tea-bagging reasons, lol.

Anyway, here's a sample mission, 1 for Utes and 1 for Takistan in the same zip - MP samples as well, but you can only preview it by hosting a MP mission since there is no respawn ability in single player at all. So if it's not working correctly, it's because you need to preview it in multiplayer and host your own session. In fact, if you do test it in single player it will definitely not work at all and it is likely to conflict with the single player engine's death camera when you die - and give harmless errors.

This script was designed to work with a "respawnDelay=37". Don't ask why I chose 37 seconds, lol, it started out as 40 and I changed it to fit well with the music length. If you set the respawnDelay any shorter in your description.ext file it will cause the cameras to still be filming after you respawn. You could edit all of the camCommit times and black out time to match your desired respawnDelay time. I suggest you try it as is, but anybody with basic scripting skills can easily change the music and camera times to their liking or do whatever they wish.

The camera always starts out on the dying player, but then it pans to the killer, but if the player suicided or killed him or herself somehow, then the camera will stay on the player. If the player dies from any other causes, like a secondary explosion from a burning vehicle, or a fall, the camera will still stay on the player. The sample mission has enemy soldiers, an enemy tank and an enemy chopper, so you you can try to get killed different ways to see how the camera will spectate different enemy vehicles. Works well on any enemy vehicle/soldier. There's also a flagpole that you can run up to that will spawn an explosion that will kill you, which I left in the sample mission for the purpose of testing other natural causes of death where no killer is involved.

The music that plays is actually a short recording of a song that comes with Operation Arrowhead, so it is actually a sound file, though it does sound more Afgani than Russian, but should still work okay for any mission type. You can easily swap the sound file for one of your own sound files, just make sure the sound finishes playing before the respawnDelay time finishes. I actually recorded my sound file so it would play louder and louder since it had to compete against the part of the script that fades all sounds, so in the game it plays through smoothly.

There is also a hideBody script that will hide and delete your dead body just before the respawnDelay finishes, so if you are already using a hide body script in your mission for your playable units, then you can either remove your hide body script, or remove the hide body scripts that is used in the sample mission.

Death_Cam_Sample_Mission.zip

Share this post


Link to post
Share on other sites

Hey mate!!

Very nice script!!

I presume in the description.ext file that this line

disabledAI = 1;

means that it doesn't try to record each AI dying?

Thanks

Share this post


Link to post
Share on other sites

Normally I always disable AI, but you don't have to disable them. It should not be a problem to leave them enabled. I don't think the death cam script will have any effect on AI teammates.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×