Jump to content

Recommended Posts

I found this on the new dev build, its a kill cam but how do I add this to my mission to test it?

/*
Author: Karel Moricky

Description:
Death screen.

Parameter(s):
	0: OBJECT - killed unit
	1: OBJECT - killer

Returns:
NOTHING
*/
private ["_soundvolume","_musicvolume"];

#define CONTROL	(_display displayctrl _n)

disableserialization;
_player = _this select 0;
_killer = _this select 1;
if (isnull _killer) then {_killer = _player};

_start = isnil "bis_fnc_death_start";
if (_start) then {
bis_fnc_death_start = [daytime,time / 3600];

_musicvolume = musicvolume;
_soundvolume = soundvolume; //MUF-TODO: check if this is done before sound is faded in fn_feedbackMain.fsm
//3.5 fadesound 0; //MUF-commented

sleep 2;
cutText ["","BLACK OUT",1];
sleep 1.5;
       BIS_fnc_feedback_allowPP = false; //MUF-switch health PP off
(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1];//MUF-black in (remove black screen that was launched in FSM PP)

enableenddialog;
};

waituntil {!isnull (finddisplay 58)};
_display = finddisplay 58;

//--- Black fade in
_n = 1060;
CONTROL ctrlsetfade 1;
if (_start) then {

//--- Play ambient radio
setacctime 1;
0 fademusic 0;
4 fademusic 0.8;
playmusic format ['RadioAmbient%1',ceil random 1/*30*/];
_musicEH = addMusicEventHandler ["MusicStop",{_this call bis_fnc_log; [] spawn {playmusic format ['RadioAmbient%1',ceil random 1/*30*/];};}];
uinamespace setvariable ["bis_fnc_death_musicEH",_musicEH];
_display displayaddeventhandler ["unload","removeMusicEventHandler ['MusicStop',uinamespace getvariable ['bis_fnc_death_musicEH',-1]];"];

CONTROL ctrlcommit 4;
} else {
CONTROL ctrlcommit 0;
};
cuttext ["","plain"];

//--- HUD
_n = 5800;
CONTROL ctrlsettext gettext (configfile >> "cfgingameui" >> "cursor" >> "select");
CONTROL ctrlsetposition [-10,-10,safezoneH * 0.07 * 3/4,safezoneH * 0.07];
CONTROL ctrlsettextcolor [1,1,1,1];
CONTROL ctrlcommit 0;

//--- SITREP (ToDO: Localize)
_sitrep = "SITREP||";
if (name _player != "Error: No unit") then {
_sitrep = _sitrep + "KIA: %4. %5|";
};
_sitrep = _sitrep + "TOD: %2 [%3]|LOC: %6 \ %7";
if (_killer != _player) then {
_sitrep = _sitrep + "||ENY: %8";
if (currentweapon _killer != "") then {
	_sitrep = _sitrep + "|ENW: %9</t>"
};
};
_sitrep = format [
_sitrep,
1 * safezoneH,
[bis_fnc_death_start select 0,"HH:MM:SS"] call bis_fnc_timetostring,
[bis_fnc_death_start select 1,"HH:MM:SS"] call bis_fnc_timetostring,
toupper localize format ["STR_SHORT_%1",rank _player],
toupper name _player,
mapGridPosition _player,
toupper worldname,
toupper ((configfile >> "cfgvehicles" >> typeof _killer) call bis_fnc_displayname),
toupper ((configfile >> "cfgweapons" >> currentweapon _killer) call bis_fnc_displayname)

];

_n = 11000;
_bcgPos = ctrlposition CONTROL;
_n = 5858;
//CONTROL ctrlsetposition [_bcgPos select 0,safezoneY + ((_bcgPos select 0) - safezoneX) * 4/3,safezoneW - 2 * (_bcgPos select 2),safezoneH / 2];
CONTROL ctrlsetposition [(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX),
		 ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY),
		 safezoneW - 2 * (_bcgPos select 2),
		 safezoneH / 2];
CONTROL ctrlcommit 0;
[CONTROL,_sitrep] spawn {
scriptname "BIS_fnc_death: SITREP";
disableserialization;
_control = _this select 0;
_sitrepArray = toarray (_this select 1);
{_sitrepArray set [_foreachindex,tostring [_x]]} foreach _sitrepArray;
_sitrep = "";
//_sitrepFormat = "<t align='left' font='EtelkaMonospaceProBold' shadow='1' size='" + str safezoneH + "'>%1</t>";
_sitrepFormat = "<t align='left' font='EtelkaMonospaceProBold' shadow='1'>%1</t>";

sleep 1;
for "_i" from 0 to (count _sitrepArray - 1) do {
	_letter = _sitrepArray select _i;
	_delay = if (_letter == "|") then {_letter = "<br />"; 1} else {0.01};
	_sitrep = _sitrep + _letter;
	_control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep + "_"];
	//playsound ["IncomingChallenge",true];
	sleep _delay;
	if (isnull _control) exitwith {};
};
_control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep];
};


//--- Create UAV camera
_camera = "camera" camcreate position player;
_camera cameraeffect ["internal","back"];
_camera campreparefov 0.4;
_camera campreparetarget _killer;
showcinemaborder false;

//--- Set PP effects
_saturation = 0.2 + random 0.3;
_ppColor = ppEffectCreate ["ColorCorrections", 1999];
_ppColor ppEffectEnable true;
_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1 - _saturation, 1 - _saturation, 1 - _saturation, _saturation], [1, 1, 1, 1.0]];
_ppColor ppEffectCommit 0;

_ppGrain = ppEffectCreate ["filmGrain", 2012];
_ppGrain ppEffectEnable true;
_ppGrain ppEffectAdjust [random 0.2, 1, 1, 0, 1];
_ppGrain ppEffectCommit 0;

//--- Camera update executed every frame
bis_fnc_death_player = _player;
bis_fnc_death_killer = _killer;
bis_fnc_death_camera = _camera;
bis_fnc_death_loop = {
scriptname "BIS_fnc_death: camera";
_display = _this select 0;
_player = bis_fnc_death_player;
_killer = bis_fnc_death_killer;
_camera = bis_fnc_death_camera;

_sin = 20 * sin (time * 7);
_killerPos = [
	(getposasl _killer select 0),
	(getposasl _killer select 1) + (_sin),
	(getposasl _killer select 2) + (_sin)
];

_dirToKiller = if (_killer == _player) then {
	direction _player;
} else {
	([_player,_killerPos] call bis_fnc_dirto) + _sin;
};
_pos = [
	getposasl _player,
	-20,
	_dirToKiller
] call bis_fnc_relpos;
_pos set [2,((_pos select 2) + 7) max (getterrainheightasl _pos + 7)];

//--- Pitch
_heightCamera = getterrainheightasl _pos;
_heightKiller = getterrainheightasl _killerPos;
_height = _heightCamera - _heightKiller;
_dis = _killerPos distance _pos;
_angle = (asin (_height/_dis));

_camera setdir _dirtokiller;
[_camera,-_angle,_sin] call bis_fnc_setpitchbank;
_camera setposasl _pos;

//--- HUD
_n = 5800;
_hudPos = (worldtoscreen position _player);
if (count _hudPos > 0) then {
	_hudPosW = ctrlposition CONTROL select 2;
	_hudPosH = ctrlposition CONTROL select 3;
	_hudPos = [
		(_hudPos select 0) - _hudPosW / 2,
		(_hudPos select 1) - _hudPosH / 2,
		_hudPosW,
		_hudPosH
	];
	CONTROL ctrlsetposition _hudPos;
	CONTROL ctrlcommit 0;
};
};

bis_fnc_death_keydown = {
_key = _this select 1;

if (_key in (actionkeys 'nightvision') || _key < 0) then {
	bis_fnc_death_vision = bis_fnc_death_vision + 1;
	_vision = bis_fnc_death_vision % 4;
	switch (_vision) do {
		case 0: {
			camusenvg false;
			call compile 'false SetCamUseTi 0';
		};
		case 1: {
			camusenvg true;
			call compile 'false SetCamUseTi 0';
		};
		case 2: {
			camusenvg false;
			call compile 'true SetCamUseTi 0';
		};
		case 3: {
			camusenvg false;
			call compile 'true SetCamUseTi 1';
		};
	};
};
};
//bis_fnc_death_vision = (1 + floor random 3) % 4; //--- Random vision (not NVG)
bis_fnc_death_vision = -1;
[-1,-1] call bis_fnc_death_keydown;

_display displayaddeventhandler ["mousemoving","_this call bis_fnc_death_loop"];
_display displayaddeventhandler ["mouseholding","_this call bis_fnc_death_loop"];
_display displayaddeventhandler ["keydown","_this call bis_fnc_death_keydown"];


//--- Team Switch display opened
waituntil {isnull _display};
_displayTeamSwitch = finddisplay 632;

//--- Team Switch display closed - cleanup and restart the view
waituntil {isnull _displayTeamSwitch};

_camera cameraeffect ["terminate","back"];
camdestroy _camera;

bis_fnc_death_player = nil;
bis_fnc_death_killer = nil;
bis_fnc_death_camera = nil;
bis_fnc_death_loop = nil;

ppeffectdestroy _ppColor;
ppeffectdestroy _ppGrain;

if (!alive player) exitwith {_this call bis_fnc_death;};


//--- Resurrection!
BIS_fnc_feedback_allowPP = true;
0 fadesound _soundvolume;
0 fademusic _musicvolume;
bis_fnc_death_start = nil;

Share this post


Link to post
Share on other sites

Assuming that its fnc name is "BIS_Kill_Cam" it would be something like

 [_player1,_player2] call BIS_Kill_Cam;

which would make the camera fade out on the player1 and then pan from them to player 2.

/*
Author: Karel Moricky

Description:
Death screen.

Parameter(s):
	0: OBJECT - killed unit
	1: OBJECT - killer

Returns:
NOTHING
*/

All of the scripts in arma3(all as in mostly all of them) have this part at the top that tells you how to call it. This says it requires 2 parameters, we pass that to the script by putting them in left/right brackets with commas as the separator. Since it says OBJECT we could in theory use this for say doing a fly over of a target however so of the other code might be expecting a player and perform some operations that might cause an error.

Edited by xyberviri

Share this post


Link to post
Share on other sites

Fantastic mate, thanks for the info I understand now, no need for the raw script if its a BIS function.

_player addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] call BIS_fnc_death}];

Share this post


Link to post
Share on other sites

BIS_fnc_death is the default kill cam, so the easiest way how to see it in your mission is simply to die ;)

Share this post


Link to post
Share on other sites

Thanks Moricky, its cool you spotted my thread and took the time to reply.

Edited by Bigpickle

Share this post


Link to post
Share on other sites
Fantastic mate, thanks for the info I understand now, no need for the raw script if its a BIS function.

_player addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] call BIS_fnc_death}];

I think Moricky meant more that this is already mapped by default in A3. So you dont need to map the event handler, my mistake for leaving that out.

Share this post


Link to post
Share on other sites

I'm still struggling to make this work, when i die i just get black screen then respawn. Do i need to add something to the players init line to make sure BIS_fnc_death activates?

Share this post


Link to post
Share on other sites

Anyone have a script so that the camera pans the killer like the old days?

Share this post


Link to post
Share on other sites
Anyone have a script so that the camera pans the killer like the old days?

//   Killed.sqf
//   player addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] execVM "Scripts\Killed.sqf"}];
//   Generates deathcam

_player = _this select 0;
_killer = _this select 1;
_grp = group _player;
_gcount = count units _grp;

if(not (isPlayer _killer) and side _killer == side _player) then
{
hint " Carefull, you've pissed off friendly AI!";
};//AI TK//working?

_camera = "camera" camCreate [(position _player select 0)-0.75, (position _player select 1)-0.75,(position _player select 2) + 0.5];
_preload = [] spawn {waitUntil{preloadCamera [4516.60,2606.42,1.73]}};
_camera cameraEffect ["internal","back"];

_camera camSetFOV 1;
_camera camSetTarget vehicle _player;
if(vehicle player != player) then {_camera camSetRelPos [0,10,1]}else{_camera camSetRelPos [0,2,1]};
_camera camCommit 0;
waitUntil {camCommitted _camera}; // Look at player

_camera camCommand "inertia on";

sleep 2.0; // Time for death anim to play

if (not isNull vehicle _killer) then
{
_camera camSetTarget vehicle _killer;
_camera camPreparePos [ getPos vehicle _killer select 0, (getPos vehicle _killer select 1) -10,getPos vehicle _killer select 2];
}else{
_camera camSetTarget vehicle _player
};

_camera camSetFOV 0.3;
_camera camCommit 4;
waitUntil {camCommitted _camera}; // Look at killer

Sleep 3.0;

titleCut["", "BLACK out",2];

_player cameraEffect ["terminate","back"];
camUseNVG false;
camDestroy _camera;
titleCut["", "BLACK in",1];

Share this post


Link to post
Share on other sites

I called the above with a : !alive player trigger and when shot I get a brief look at the ocean and then the standard hovering cam over my body

Share this post


Link to post
Share on other sites

Try running it from a killed event handler like this.

init.sqf
// Init Player
if (!isdedicated && hasInterface) then
{
[] spawn {
	waitUntil {!isNull player};
	waitUntil {player == player};
	player addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] execVM "Killed.sqf"}];
};
};

Share this post


Link to post
Share on other sites

Still no luck, it actually creates a very cool external 3d camera in which you watch yourself die but afterwards it does standard cam and then basically a really, really closeup of player's head.

And looking at OP, it appears as if it's supposed to pan from player to killer or maybe relative direction using UAV camera but I never see the killer. Perhaps he's out of range by that time I don't know..

Edited by froggyluv

Share this post


Link to post
Share on other sites

Nevermind I got it! I just changed the script from OP around abit and it's working fine now. Thanks :)

Share this post


Link to post
Share on other sites

Turned out pretty well as I stacked the original script (changing some _player to _killer) on top of jigsor's. It's a murderous piece of ugly hack code but hey, it works! If anyone cares to clean up right like I'd be much obliged :)

player addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] execVM "Scripts\deathcam.sqf"}];

_player = _this select 0;

_killer = _this select 1;

_grp = group _player;

_gcount = count units _grp;

if(not (isPlayer _killer) and side _killer == side _player) then

{

hint " Carefull, you've pissed off friendly AI!";

};//AI TK//working?

_camera = "camera" camCreate [(position _player select 0)-0.75, (position _player select 1)-0.75,(position _player select 2) + 0.5];

_preload = [] spawn {waitUntil{preloadCamera [4516.60,2606.42,1.73]}};

_camera cameraEffect ["internal","back"];

_camera camSetFOV 1;

_camera camSetTarget vehicle _player;

if(vehicle player != player) then {_camera camSetRelPos [0,10,1]}else{_camera camSetRelPos [0,2,1]};

_camera camCommit 0;

waitUntil {camCommitted _camera}; // Look at player

_camera camCommand "inertia on";

sleep 2.0; // Time for death anim to play

if (not isNull vehicle _killer) then

{

_camera camSetTarget vehicle _killer;

_camera camPreparePos [ getPos vehicle _killer select 0, (getPos vehicle _killer select 1) -10,getPos vehicle _killer select 2];

}else{

_camera camSetTarget vehicle _killer

};

_camera camSetFOV 0.3;

_camera camCommit 4;

waitUntil {camCommitted _camera}; // Look at killer

Sleep 3.0;

titleCut["", "BLACK out",2];

_player cameraEffect ["terminate","back"];

camUseNVG false;

camDestroy _camera;

titleCut["", "BLACK in",1];

private ["_soundvolume","_musicvolume"];

#define CONTROL (_display displayctrl _n)

disableserialization;

_player = _this select 0;

_killer = _this select 1;

if (isnull _killer) then {_killer = _player};

_start = isnil "bis_fnc_death_start";

if (_start) then {

bis_fnc_death_start = [daytime,time / 3600];

_musicvolume = musicvolume;

_soundvolume = soundvolume; //MUF-TODO: check if this is done before sound is faded in fn_feedbackMain.fsm

//3.5 fadesound 0; //MUF-commented

sleep 2;

cutText ["","BLACK OUT",1];

sleep 1.5;

BIS_fnc_feedback_allowPP = false; //MUF-switch health PP off

(["HealthPP_black"] call bis_fnc_rscLayer) cutText ["","BLACK IN",1];//MUF-black in (remove black screen that was launched in FSM PP)

enableenddialog;

};

waituntil {!isnull (finddisplay 58)};

_display = finddisplay 58;

//--- Black fade in

_n = 1060;

CONTROL ctrlsetfade 1;

if (_start) then {

//--- Play ambient radio

setacctime 1;

0 fademusic 0;

4 fademusic 0.8;

playmusic format ['RadioAmbient%1',ceil random 1/*30*/];

_musicEH = addMusicEventHandler ["MusicStop",{_this call bis_fnc_log; [] spawn {playmusic format ['RadioAmbient%1',ceil random 1/*30*/];};}];

uinamespace setvariable ["bis_fnc_death_musicEH",_musicEH];

_display displayaddeventhandler ["unload","removeMusicEventHandler ['MusicStop',uinamespace getvariable ['bis_fnc_death_musicEH',-1]];"];

CONTROL ctrlcommit 4;

} else {

CONTROL ctrlcommit 0;

};

cuttext ["","plain"];

//--- HUD

_n = 5800;

CONTROL ctrlsettext gettext (configfile >> "cfgingameui" >> "cursor" >> "select");

CONTROL ctrlsetposition [-10,-10,safezoneH * 0.07 * 3/4,safezoneH * 0.07];

CONTROL ctrlsettextcolor [1,1,1,1];

CONTROL ctrlcommit 0;

//--- SITREP (ToDO: Localize)

_sitrep = "SITREP||";

if (name _player != "Error: No unit") then {

_sitrep = _sitrep + "KIA: %4. %5|";

};

_sitrep = _sitrep + "TOD: %2 [%3]|LOC: %6 \ %7";

if (_killer != _player) then {

_sitrep = _sitrep + "||ENY: %8";

if (currentweapon _killer != "") then {

_sitrep = _sitrep + "|ENW: %9</t>"

};

};

_sitrep = format [

_sitrep,

1 * safezoneH,

[bis_fnc_death_start select 0,"HH:MM:SS"] call bis_fnc_timetostring,

[bis_fnc_death_start select 1,"HH:MM:SS"] call bis_fnc_timetostring,

toupper localize format ["STR_SHORT_%1",rank _player],

toupper name _player,

mapGridPosition _player,

toupper worldname,

toupper ((configfile >> "cfgvehicles" >> typeof _killer) call bis_fnc_displayname),

toupper ((configfile >> "cfgweapons" >> currentweapon _killer) call bis_fnc_displayname)

];

_n = 11000;

_bcgPos = ctrlposition CONTROL;

_n = 5858;

//CONTROL ctrlsetposition [_bcgPos select 0,safezoneY + ((_bcgPos select 0) - safezoneX) * 4/3,safezoneW - 2 * (_bcgPos select 2),safezoneH / 2];

CONTROL ctrlsetposition [(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX),

((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY),

safezoneW - 2 * (_bcgPos select 2),

safezoneH / 2];

CONTROL ctrlcommit 0;

[CONTROL,_sitrep] spawn {

scriptname "BIS_fnc_death: SITREP";

disableserialization;

_control = _this select 0;

_sitrepArray = toarray (_this select 1);

{_sitrepArray set [_foreachindex,tostring [_x]]} foreach _sitrepArray;

_sitrep = "";

//_sitrepFormat = "<t align='left' font='EtelkaMonospaceProBold' shadow='1' size='" + str safezoneH + "'>%1</t>";

_sitrepFormat = "<t align='left' font='EtelkaMonospaceProBold' shadow='1'>%1</t>";

sleep 1;

for "_i" from 0 to (count _sitrepArray - 1) do {

_letter = _sitrepArray select _i;

_delay = if (_letter == "|") then {_letter = "<br />"; 1} else {0.01};

_sitrep = _sitrep + _letter;

_control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep + "_"];

//playsound ["IncomingChallenge",true];

sleep _delay;

if (isnull _control) exitwith {};

};

_control ctrlsetstructuredtext parsetext format [_sitrepFormat,_sitrep];

};

//--- Create UAV camera

_camera = "camera" camcreate position player;

_camera cameraeffect ["internal","back"];

_camera campreparefov 0.4;

_camera campreparetarget _killer;

showcinemaborder false;

//--- Set PP effects

_saturation = 0.2 + random 0.3;

_ppColor = ppEffectCreate ["ColorCorrections", 1999];

_ppColor ppEffectEnable true;

_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1 - _saturation, 1 - _saturation, 1 - _saturation, _saturation], [1, 1, 1, 1.0]];

_ppColor ppEffectCommit 0;

_ppGrain = ppEffectCreate ["filmGrain", 2012];

_ppGrain ppEffectEnable true;

_ppGrain ppEffectAdjust [random 0.2, 1, 1, 0, 1];

_ppGrain ppEffectCommit 0;

//--- Camera update executed every frame

bis_fnc_death_player = _player;

bis_fnc_death_killer = _killer;

bis_fnc_death_camera = _camera;

bis_fnc_death_loop = {

scriptname "BIS_fnc_death: camera";

_display = _this select 0;

_player = bis_fnc_death_player;

_killer = bis_fnc_death_killer;

_camera = bis_fnc_death_camera;

_sin = 20 * sin (time * 7);

_killerPos = [

(getposasl _killer select 0),

(getposasl _killer select 1) + (_sin),

(getposasl _killer select 2) + (_sin)

];

_dirToKiller = if (_killer == _player) then {

direction _player;

} else {

([_player,_killerPos] call bis_fnc_dirto) + _sin;

};

_pos = [

getposasl _killer,

-20,

_dirToKiller

] call bis_fnc_relpos;

_pos set [2,((_pos select 2) + 7) max (getterrainheightasl _pos + 7)];

//--- Pitch

_heightCamera = getterrainheightasl _pos;

_heightKiller = getterrainheightasl _killerPos;

_height = _heightCamera - _heightKiller;

_dis = _killerPos distance _pos;

_angle = (asin (_height/_dis));

_camera setdir _dirtokiller;

[_camera,-_angle,_sin] call bis_fnc_setpitchbank;

_camera setposasl _pos;

//--- HUD

_n = 5800;

_hudPos = (worldtoscreen position _killer);

if (count _hudPos > 0) then {

_hudPosW = ctrlposition CONTROL select 2;

_hudPosH = ctrlposition CONTROL select 3;

_hudPos = [

(_hudPos select 0) - _hudPosW / 2,

(_hudPos select 1) - _hudPosH / 2,

_hudPosW,

_hudPosH

];

CONTROL ctrlsetposition _hudPos;

CONTROL ctrlcommit 0;

};

};

bis_fnc_death_keydown = {

_key = _this select 1;

if (_key in (actionkeys 'nightvision') || _key < 0) then {

bis_fnc_death_vision = bis_fnc_death_vision + 1;

_vision = bis_fnc_death_vision % 4;

switch (_vision) do {

case 0: {

camusenvg false;

call compile 'false SetCamUseTi 0';

};

case 1: {

camusenvg true;

call compile 'false SetCamUseTi 0';

};

case 2: {

camusenvg false;

call compile 'true SetCamUseTi 0';

};

case 3: {

camusenvg false;

call compile 'true SetCamUseTi 1';

};

};

};

};

//bis_fnc_death_vision = (1 + floor random 3) % 4; //--- Random vision (not NVG)

bis_fnc_death_vision = -1;

[-1,-1] call bis_fnc_death_keydown;

_display displayaddeventhandler ["mousemoving","_this call bis_fnc_death_loop"];

_display displayaddeventhandler ["mouseholding","_this call bis_fnc_death_loop"];

_display displayaddeventhandler ["keydown","_this call bis_fnc_death_keydown"];

//--- Team Switch display opened

waituntil {isnull _display};

_displayTeamSwitch = finddisplay 632;

//--- Team Switch display closed - cleanup and restart the view

waituntil {isnull _displayTeamSwitch};

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

camdestroy _camera;

bis_fnc_death_player = nil;

bis_fnc_death_killer = nil;

bis_fnc_death_camera = nil;

bis_fnc_death_loop = nil;

ppeffectdestroy _ppColor;

ppeffectdestroy _ppGrain;

if (!alive player) exitwith {_this call bis_fnc_death;};

//--- Resurrection!

BIS_fnc_feedback_allowPP = true;

0 fadesound _soundvolume;

0 fademusic _musicvolume;

bis_fnc_death_start = nil;

Edited by froggyluv

Share this post


Link to post
Share on other sites

How can i disable the BIS's kill cam? I want to make custom one.

Edited by danczer

Share this post


Link to post
Share on other sites

I would love to see a kill cam script as well

Share this post


Link to post
Share on other sites

I had one from Zonekiller revive, (it stoped working after update)..

I'm not sure if he is going to fix it, but I'm going to ask if I can.. (if I can)...

its in a mission called battlezone , best revive script ive used it included a deathcam ...

Share this post


Link to post
Share on other sites

I remember the best death cam from call of duty

Share this post


Link to post
Share on other sites

@moricky I'm trying to use the enableEndDialog command but I get a 90% black screen when it triggers ... is it broken ?

Help please !

playerKilledScript.sqs
 

Spoiler



;init

_player = _this select 0
_killer = _this select 1

_camera = "camera" camCreate [9578.59,3540.29,1.66]
_camera cameraEffect ["internal","back"]

3.5 fadesound 0

enableEndDialog

? (_killer != _killer or _killer == _player) : goto "suicide"

;=== 14:30:26
_camera camSetTarget vehicle _player
_camera camSetRelPos [5.80,1.29,3.07]
_camera camSetFOV 0.100
_camera camCommit 0
@camCommitted _camera

;=== 14:30:54
_camera camSetRelPos [2.71,19.55,12.94]
_camera camSetFOV 0.700
_camera camCommit 5
~3
0 fadeMusic 1
playMusic "Track10"
@camCommitted _camera


;=== 14:31:29
_camera camSetTarget _killer
_camera camSetRelPos [-6.66,18.99,2.59]
_camera camSetFOV 0.700
_camera camCommit 5
@camCommitted _camera
;=== 14:32:05
_camera camSetRelPos [1.17,-21.71,-1.07]
_camera camSetFOV 0.070
_camera camCommit 10
@camCommitted _camera


;=== 14:30:26
_camera camSetTarget vehicle _player
_camera camSetRelPos [5.80,1.29,3.07]
_camera camSetFOV 0.700
_camera camCommit 0.0
@camCommitted _camera

;=== 14:30:54
_camera camSetRelPos [2.71,19.55,12.94]
_camera camCommit 60
@camCommitted _camera

#zoom
_camera camSetFOV 0.005
_camera camCommit 50
@camCommitted _camera
_camera camSetFOV 1.8
_camera camCommit 50
@camCommitted _camera
goto "zoom"

goto "exitus"

#suicide

0 fadeMusic 0.5
playMusic "Track10"

;=== 14:30:26
_camera camSetTarget vehicle _player
_camera camSetRelPos [5.80,1.29,3.07]
_camera camSetFOV 0.700
_camera camCommit 0.0
@camCommitted _camera

;=== 14:30:54
_camera camSetRelPos [2.71,19.55,12.94]
_camera camCommit 60
@camCommitted _camera



#zoom
_camera camSetFOV 0.005
_camera camCommit 50
@camCommitted _camera
_camera camSetFOV 1.8
_camera camCommit 50
@camCommitted _camera
goto "zoom"


#exitus
;exit
_player cameraEffect ["terminate","back"]
camDestroy _camera
exit


 

 

Share this post


Link to post
Share on other sites

wow there are people using sqs scripts nowadays. sry to be off topic ...

Share this post


Link to post
Share on other sites

What ever the reason, this is a way to bypass Arma 3 BUGS ! 

Found my way around this bug with @POLPOX's help. If this can help future people like me that struggle with things BI broke : 

CUSTOM DEATH SCREEN : (Working but will probably need improving)
 

playerKilledScript.sqs

_player = _this select 0
_killer = _this select 1
[_player, _killer] execVM "deathScreen.sqf"

 

deathScreen.sqf

_player = _this select 0;
_killer = _this select 1;

#define CONTROL    (_display displayctrl _n)

disableSerialization;

if (isNull _killer) then {_killer = _player};

_start = isNil "bis_fnc_respawnNone_start";
if (_start) then {
    bis_fnc_respawnNone_start = [daytime,time / 3600];

    3.5 fadeSound 0;
    sleep 2;
    if (alive player) exitwith {};
    cutText ["","BLACK OUT",1];
    sleep 1.5;
    BIS_fnc_feedback_allowPP = false;

    if (isMultiplayer) then {(findDisplay 46) createDisplay "RscDisplayMissionEnd";} else {enableEndDialog};
};

waitUntil {!isNull (findDisplay 58)};
_display = findDisplay 58;

//--- Black fade in
_n = 1060;
CONTROL ctrlsetfade 1;
if (_start) then
{
    CONTROL ctrlcommit 4;
}
else
{
    CONTROL ctrlcommit 0;
};
cuttext ["","plain"];

//--- HUD
_n = 5800;
CONTROL ctrlsettext gettext (configfile >> "cfgingameui" >> "cursor" >> "select");
CONTROL ctrlsetposition [-10,-10,safezoneH * 0.07 * 3/4,safezoneH * 0.07];
CONTROL ctrlsettextcolor [1,1,1,1];
CONTROL ctrlcommit 0;

_n = 11000;
_bcgPos = ctrlposition CONTROL;
_n = 5858;
CONTROL ctrlsetposition [(((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX),
             ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY),
             safezoneW - 2 * (_bcgPos select 2),
             safezoneH / 2];
CONTROL ctrlcommit 0;

// CAMERA SCENE BELLOW

 

Share this post


Link to post
Share on other sites

why is it not possible to use the deathScreen.sqf code directly in onPlayerKilled.sqf?

 

EDIT: I see its about the given input variables.

EDIT2: Oh, it isn't. I don't get it. So the above question stands...

EDIT3: what is this line for?

_start = isNil "bis_fnc_respawnNone_start";

 

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

×