If you want to target the unit you killedErm i thought Maximus-Sniper wanted a death cam where when your dead it shows who killed you and so on. and als you then go to say
_unit = _this select 0wich i beleive in the onplayerkilled.sqs script is the player wich is now dead _this select 1 is the killer but you have no need to say that so you can use _killer and player becuase these have already been passed through the onplayerkilled.sqs script
I mean if i kill a officer, than i want a script to start a deth cam of the officer, when my bullet hit him, so i can see in slow motion fall down to the ground.
'_unit|#| addEventHandler ["Killed",{_unit exec {RAST\script\rast_deathcam.sqs}}]'; Error Local variable in global space
this addEventHandler ["Killed",{_unit exec {RAST\script\rast_deathcam.sqs}}]';
now simply add that line into the soldiers init filed and then have a go also you have the cript n the right place by the looks of it its going to be in a folder
_unit = _this select 0
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
exit
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=1.00000;
//condition="this";
condition="(Format [{%1},Death_Cam_On] != {false}) && (player == this)";
statement="this addEventHandler [""killed"",{_unit exec {\RAST\script\rast_deathcam.sqs}}]";
};
statement="this addEventHandler [""killed"",{this exec {\RAST\script\rast_deathcam.sqs}}]";
this = _this select 0
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget this
_cam camSetRelPos [3,5,3]
~3
exit
#loop
? slow_mo_deathcam_on : goto "EH"
{this <line to remove event handler's here> _x} foreach units eastsnipe
~5
goto "loop"
#EH
{this addEventHandler [""killed"",{this exec {\RAST\script\rast_deathcam.sqs}}]" _x} foreach units eastsnipe
? slow_mo_deathcam_off : goto "loop"
~5
goto "EH"
#loop
? slow_mo_deathcam_on : goto "EH"
{this removeAllEventHandlers _x} foreach units eastsnipe
~5
goto "loop"
#EH
{this addEventHandler [""killed"",{this exec ""\RAST\script\Death_Cam\rast_deathcam.sqs""}]" _x} foreach units eastsnipe
? slow_mo_deathcam_off : goto "loop"
~5
goto "EH"
this = _this select 0
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget this
_cam camSetRelPos [3,5,3]
~3
exit
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="player";
radius=999999;
//condition="this";
condition="(Format [{%1},Death_Cam] != {false}) && (player == this)";
statement="eastsnipe=this list; this exec {\RAST\script\Death_Cam\deathcam.sqs}";
};
condition="(Format [{%1},Death_Cam] != {false}) && (player == this)";
'eastsnipe = this |#|list; this exec "RAST\script\Death_Cam\deathcam.sqs"': Error Uknown Operator list
statement="this exec {\RAST\script\Death_Cam\deathcam.sqs}";
'{|#|this {this removeAllEventHandlers _x} foreach units eastsnipe': Error Missing )
statement="eastsnipe = list this; this exec ""\RAST\script\Death_Cam\deathcam.sqs""";
'{this removeAllEventHandlers _x} foreach units eastsnipe|#|': Error units: Type Array, expected Object,Group
#loop
? slow_mo_deathcam_on : goto "EH"
{this removeAllEventHandlers _x} foreach units eastsnipe
~5
.
.
.
.
slo_mo_deathcam_on and slo_mo_deathcam_off defined?never im using that as an example
never im using that as an example
btw there's not really any point in making 1 unit called east1, then putting:
eastsnipe = [east1,east2,east3]
when east2 and east3 don't even exist :P
? slow_mo_deathcam_on : goto "EH"
well, atm, it isn't defined. So the script will never run "EH".
So, you'll need to do that do get the script working.
well when you switch your camera on make switch a variable to true an easier example
death cam = on therefore
deathcam = true
death cam = off therefore
deathcam = false
like that of course if you dont use deathcam as the variable change it to what you do use in the script i made then it should work fine
#loop
? slow_mo_deathcam_on : goto "EH"
{_x removeAllEventHandlers "killed"} foreach eastsnipe
~5
goto "loop"
#EH
{_x addEventHandler ["killed",{this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} foreach eastsnipe
? slow_mo_deathcam_off : goto "loop"
~5
goto "EH"
slow_mo_deathcam = true
and when you turn it off put slow_mo_deathcam = flase
#loop
? slow_mo_deathcam_on : goto "EH"
{_x removeAllEventHandlers "killed"} foreach eastsnipe
~5
goto "loop"
#EH
{_x addEventHandler ["killed",{this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} foreach eastsnipe
? slow_mo_deathcam_off : goto "loop"
~5
goto "EH"
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} foreach eastsnipe
~5
goto "loop"
#EH
{_x addEventHandler ["killed",{this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} foreach eastsnipe
? slow_mo_deathcam !: goto "loop"
~5
goto "EH"
'slow_mo_deathcam |#|!': Error Uknown Operator
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="player";
radius=999999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
statement="slow_mo_deathcam=true; this exec {\RAST\script\Death_Cam\deathcam.sqs}";
};
this=_this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget this
_cam camSetRelPos [3,5,3]
~3
exit
? ! slow_mo_deathcam : goto "loop"
that should be in the right place if not out it right next to the slow like !slow thats if that idea doesnt work about the other message im not totally sure but at the top should work if notthen im out of ideas
#loop
{_x removeAllEventHandlers "killed"} forEach eastsnipe
{_x removeAllEventHandlers "hit"} forEach eastsnipe
? slow_mo_deathcam : goto "AddKilledEH"
~1
goto "loop"
#AddKilledEH
{_x addEventHandler ["killed",{goto "AddHitEH"}]} forEach eastsnipe
#AddHitEH
{_x addEventHandler ["hit",{_this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
? !slow_mo_deathcam : goto "loop"
~1
goto "AddKilledEH"
_unit = _this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "hit"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["hit",{goto "CheckDead"}]} forEach eastsnipe
#Check Dead
_dammage = _this select 1
_dammage >= 1 : _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
_dammage < 1 : goto "loop"
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
'_dammage < 1 |#|: goto "loop": Error Uknown Operator
_dammage < 1 : goto "loop"
'_dammage ==1 |#|: goto "loop": Error Uknown Operator
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "hit"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["hit",{goto "CheckDead"}]} forEach eastsnipe
#CheckDead
_dammage = _this select 1
_dammage >= 1 : _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
(_dammage < 1): goto "loop"
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
'(_dammage < 1)|#|: goto "loop": Error Uknown Operator
#CheckDead
_dammage = _this select 1
_dammage >= 1 : _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
(_dammage < 1): goto "loop"
? !slow_mo_deathcam : goto "loop"
~1
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "hit"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["hit",{goto "CheckDead"}]} forEach eastsnipe
#CheckDead
_dammage = _this select 1
_dammage >= 1 : _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
(_dammage < 1): goto "loop"
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
(_dammage ==1)
into that script ??'_dammage = _this select 1|#|': Error select: Type Object, expected Array
You can't use this = _this select 0. So we'll have to find a method of selecting the unit that's just been killed and run the script from him.
"killed" (addable to men or vehicles) :
_this select 0 : who's dead ;
_this select 1 : whodunnit (say, the killer) ;
_unit = _this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "hit"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["hit",{goto "CheckDead"}]} forEach eastsnipe
#Wait
~3
goto "Wait"
#CheckDead
_dammage = _this select 2;
?(_dammage >= 1): _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
?(_dammage < 1): goto "loop"
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
statement="slow_mo_deathcam=true; this exec {\RAST\script\Death_Cam\deathcam.sqs}";
};
?(_dammage >= 1): _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
?(_dammage < 1): goto "loop"
?(_dammage >= 1) : _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"
?(_dammage < 1) : goto "loop"
_unit = _this select 1
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["killed",{_unit = _this select 0; _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
_unit = _this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
_unit = _this select 1
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["killed",{_unit = _this select 0; _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
_unit = _this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
class UserActions
      {
      class DeathCamOn
      {
         displayName="Death Cam On";
         position="";
         radius=99999;
         condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
         statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
      };
eastsnipe = [east1, east2, east3]
   class UserActions
      {
      class DeathCamOn
      {
         displayName="Death Cam On";
         position="";
         radius=99999;
         condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
         statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
      };
#loop
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["killed",{_unit = _this select 0; _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
_unit = _this select 0
_cam="camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
; Slowdown time
setAccTime 0.2
_cam camSetTarget _unit
_cam camSetRelPos [3,5,3]
~3
exit
eastsnipe = [east1, east2, east3]
SetAccTime 0.2
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
_cam1 = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam1 CamSetTarget _unit
_cam1 CamSetFov 0.3
_cam1 CameraEffect ["Internal","Back"]
_cam1 CamCommit 2
@CamCommitted _cam1
SetAccTime 1.0
_cam1 CameraEffect ["Terminate","Back"]
CamDestroy _cam1
exit
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class DeathCamOff
{
displayName="Death Cam Off";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this)";
statement="slow_mo_deathcam=false; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class Eventhandlers
{
   init="cam_enabled=true";
};
class UserActions
{
   class DeathCamOn
   {
      displayName="Death Cam On";
      position="";
      radius=99999;
      condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && cam_enabled";
      statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
   };
   class DeathCamOff
   {
      displayName="Death Cam Off";
      position="";
      radius=99999;
      condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && !cam_enabled";
      statement="slow_mo_deathcam=false";
   };
};
#loop
cam_enabled=true
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["killed",{_unit = _this select 0; _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
cam_enabled=false
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
SetAccTime 0.2
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
_cam1 = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam1 CamSetTarget _unit
_cam1 CamSetFov 0.3
_cam1 CameraEffect ["Internal","Back"]
_cam1 CamCommit 2
@CamCommitted _cam1
SetAccTime 1.0
_cam1 CameraEffect ["Terminate","Back"]
CamDestroy _cam1
exit
class EventHandlers
      {
      init="RAST_M82fx=loadFile ""\RAST\Script\M82A1_FX\m82fx.sqf""; [_This Select 0] Exec ""\RAST\Script\wbe_tracerfx\wbe_tracerfx.sqs""";
      //init="RAST_M82fx=loadFile ""\RAST\Script\M82A1_FX\m82fx.sqf""; [_This Select 0] Exec ""\RAST\Script\wbe_tracerfx\wbe_tracerfx.sqs""; this exec ""\RAST\Script\Bullet_Cam\sniperinit.sqs""; PosBullcam=loadFile ""\RAST\Script\Bullet_Cam\PosBullcam.sqf""";
      fired="if ((_this select 4) in [""AMMOM82APMag"",""AMMOM82ATMag""]) then {_this call RAST_M82fx}";
      };
   };
player addaction ["Enemy Death Cam","\RAST\Script\Death_Cam\menu_2.sqs"]
player addEventHandler _this exec "\RAST\script\Death_Cam\deathcam.sqs" <----- Here is the big problem :( :( :( :(
track = false
_ID = _this select 2
player removeAction _ID
? !(track) : track = true ; player addaction ["Enemy Death Cam On", "\RAST\Script\Death_Cam\menu_2.sqs"];exit
? (track) : track = false; player addaction ["Enemy Death Cam Off", "\RAST\Script\Death_Cam\menu_2.sqs"]
init="RAST_M82fx=loadFile ""\RAST\Script\M82A1_FX\m82fx.sqf""; [_This Select 0] Exec ""\RAST\Script\wbe_tracerfx\wbe_tracerfx.sqs""; this exec ""\RAST\Script\Death_Cam\menu_1.sqs""";
btw You'll probably be wanting a method now so that you don't need to make an init.sqs each time you want to use this, right?
I'll try and fix that up for you as well
class EventHandlers
{
init="cam_enabled=true;RAST_M82fx=loadFile ""\RAST\Script\M82A1_FX\m82fx.sqf""; [_This Select 0] Exec ""\RAST\Script\wbe_tracerfx\wbe_tracerfx.sqs""";
//init="RAST_M82fx=loadFile ""\RAST\Script\M82A1_FX\m82fx.sqf""; [_This Select 0] Exec ""\RAST\Script\wbe_tracerfx\wbe_tracerfx.sqs""; this exec ""\RAST\Script\Bullet_Cam\sniperinit.sqs""; PosBullcam=loadFile ""\RAST\Script\Bullet_Cam\PosBullcam.sqf""";
fired="if ((_this select 4) in [""AMMOM82APMag"",""AMMOM82ATMag""]) then {_this call RAST_M82fx}";
};
};
#loop
cam_enabled=true
? slow_mo_deathcam : goto "EH"
{_x removeAllEventHandlers "killed"} forEach eastsnipe
~1
goto "loop"
#EH
{_x addEventHandler ["killed",{_unit = _this select 0; _this exec "\RAST\script\Death_Cam\rast_deathcam.sqs"}]} forEach eastsnipe
cam_enabled=false
? !slow_mo_deathcam : goto "loop"
~1
goto "EH"
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && cam_enabled";
statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class DeathCamOff
{
displayName="Death Cam Off";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && !cam_enabled";
statement="slow_mo_deathcam=false; cam_enabled=true";
};
};
class UserActions
      {
      class DeathCamOn
      {
         displayName="Death Cam On";
         position="";
         radius=99999;
         condition="(Format [{%1},slow_mo_deathcam] != {true}) && (player == this) && cam_enabled";
         statement="slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
      };
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {true}) && (player == this) && cam_enabled";
statement="eastsnipe=this list; slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class DeathCamOff
{
displayName="Death Cam Off";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && !cam_enabled";
statement="slow_mo_deathcam=false";
};
};
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
condition="(Format [{%1},slow_mo_deathcam] != {true}) && (player == this) && cam_enabled";
statement="eastsnipe=this list; slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
'eastsnipe=this |#|list; slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}': Error Uknown operator list
just alittle thing the deathcam i think is to slow cahnge the speed to 0.35 and add a 1 second white in at the begining and black out at the end that way it will be great
SetAccTime 0.35
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
_cam1 = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam1 CamSetTarget _unit
_cam1 CamSetFov 0.3
_cam1 CameraEffect ["Internal","Back"]
_cam1 CamCommit 2
@CamCommitted _cam1
SetAccTime 1.0
_cam1 CameraEffect ["Terminate","Back"]
CamDestroy _cam1
exit
titlecut [" ", "White in", 1]
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
SetAccTime 0.35
_cam1 = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam1 CamSetTarget _unit
_cam1 CamSetFov 0.3
_cam1 CameraEffect ["Internal","Front"]
_cam1 CamCommit 2
@CamCommitted _cam1
SetAccTime 1.0
_cam1 CameraEffect ["Terminate","Back"]
CamDestroy _cam1
exit
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {true}) && (player == this) && cam_enabled";
statement="eastsnipe=thislist; slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class DeathCamOff
{
displayName="Death Cam Off";
position="";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && !cam_enabled";
statement="slow_mo_deathcam=false";
};
};
titlecut [" ", "White in", 1]
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
SetAccTime 0.35
_cam = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam CamSetTarget _unit
_cam CamSetFov 0.3
_cam CameraEffect ["Internal","Front"]
_cam CamCommit 2
@CamCommitted _cam
SetAccTime 1.0
_cam CameraEffect ["Terminate","Back"]
CamDestroy _cam
exit
class UserActions
{
class DeathCamOn
{
displayName="Death Cam On";
position="zbran";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {true}) && (player == this) && cam_enabled";
statement="eastsnipe=thislist; slow_mo_deathcam=true; this exec {\RAST\Script\Death_Cam\deathcam.sqs}";
};
class DeathCamOff
{
displayName="Death Cam Off";
position="zbran";
radius=99999;
condition="(Format [{%1},slow_mo_deathcam] != {false}) && (player == this) && !cam_enabled";
statement="slow_mo_deathcam=false";
};
};
456820 and Planck names into my credit listnice to hear i helped
Its a shame that we couldn't get the userActions working - cause that way you wouldn't need a trigger, init.sqs, name units or anything.
also if the trigger idea doesnt work how is this going to work or have i missed something out or will soomeone have to create the trigger in game ?
anyway i cant wait until this comes out looking at the videos and pics it definately looks like one of the best snipers ive seen on ofp
titlecut [" ", "White in", 1]
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
SetAccTime 0.35
_cam = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam CamSetTarget _unit
_cam CamSetFov 0.3
_cam CameraEffect ["Internal","Front"]
_cam CamCommit 2
@CamCommitted _cam
SetAccTime 1.0
_cam CameraEffect ["Terminate","Back"]
CamDestroy _cam
exit
titlecut [" ", "White in", 1]
_unit = _this select 0
_camPos = GetPos _unit
_cx = _camPos Select 0
_cy = _camPos Select 1
_cz = _camPos Select 2
SetAccTime 0.35
_cam = "camera" CamCreate [_cx+2, _cy+1, _cz+2]
_cam CamSetTarget _unit
_cam CamSetFov 0.3
_cam CameraEffect ["Internal","Front"]
_cam CamCommit 2
@CamCommitted _cam
_cam CameraEffect ["Internal","right back"]
_cam CamSetTarget _unit
_cam CamCommit 3
@CamCommitted _cam
SetAccTime 1.0
_cam CameraEffect ["Terminate","Back"]
CamDestroy _cam
exit
; spin camera around object in downward spiral
;set up the camera
showcinemaborder true
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]
_camera camSetTarget object_name
;get the coordinates of the object to spin around
_x = getpos object_name select 0
_y = getpos object_name select 1
_dir = getdir object_name
;set up the increments by which the camera will move
_incr = 0.7
_angle = 0
_height = 50
#rotate
_camera camSetPos [_x + (8*sin(_dir+_angle)), _y + (8*cos(_dir+_angle)),_height]
_camera camCommit 0
~0.001
_angle = _angle + _incr
_height = _height - (_incr/10)
?_angle>=360:_angle = 0
?not(_height<=1):goto "rotate"
;at the bottom of the spiral, so end the script
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
showcinemaborder false
exit