Jump to content
Sign in to follow this  
A-SUICIDAL

Respawn/Spectate Script Question

Recommended Posts

Hi. I'm working on another 14 man coop mission that does not use a revive script, but instead you simply respawn at base after 30 seconds. I was looking for a spectate script that will show the countdown timer on the screen until you respawn, but instead of a black screen with a counter, I wanted to have the camera spectate your own dead body and pan out, maybe play some sort of dark music or ambient sound and show the screen in a different color, like red or brown something.

Honestly I wouldn't know where to begin exactly if I tried to write this script myself, but it seems pretty basic, so I thought I would throw the idea out there and see if somebody might want to tackle it.

Spectating the enemy that killed you: might not work well in case you killed yourself somehow or got TK'd.

Spectating other teammates: might not work well since there are 13 teammates and only 30 seconds to spectate them before you respawn and it would require some sort of GUI to cycle through them.

I even thought of having a camera spectate a blackbird, with a red screen, some sort of dark music or ambient sound playing and still show the "Respawning in.... seconds".

Anything other than 30 seconds of black screen would be an improvement.

Share this post


Link to post
Share on other sites

This works well for a 30 sec respawn timer. I just wrote it :)

It beats the hell out of 30 seconds of black screen.

It slowly pans out on your dead body to about 50 meters high while turning your screen to an nice alpha red color while at the same time fading to black and fading all sounds.

After the 30 seconds is over and you respawn, the black screen fades back in and all sounds fade back in within 3 seconds.

In my sample mission I recorded 2 sound clips that get played when you die to add more of a dramatic effect, but here's the script without the added sounds, but it still fades all sounds.

Sample Mission

player init:

this addEventHandler ["killed", {(_this select 0) execVM "death_cam.sqf"}];

death_cam.sqf:


showcinemaborder = true;

private "_cam";

30 fadeSound 0;

titlecut["","BLACK OUT",30];

ppColor = ppEffectCreate ["ColorCorrections", 1999]; 
ppColor ppEffectEnable true;
ppColor ppEffectAdjust [1, 1, 0, [1.5,-1,-1.5,0.01], [1,0,0,-0.01], [1,0,0,-0.01]];
ppColor ppEffectCommit 15;

_cam = "camera" camCreate [position player select 0,position player select 1,2];
_cam camSetTarget player;
_cam cameraeffect["internal","back"];
_cam camCommit 0;

_cam camSetPos [position player select 0,(position player select 1) + 50,50];
_cam camCommit 30;

waitUntil {camCommitted _cam;};

player cameraeffect["terminate","back"];

ppEffectDestroy ppColor;
camdestroy _cam;

3 fadeSound 1;
titlecut["","BLACK IN",3];

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  

×