Hi again
Last update of this script ;D ;D
config.cpp @ Class UserActions:
   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}";
      };
and 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"
and rast_deathcam.sqs:
_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
and last the init.sqs:
eastsnipe = [east1, east2, east3]
But this not work
So i think the problem maybe are something with the Class UserActions in the config.cpp or maybe the init.sqs in the mission
Thanks
Maximus-Sniper
EDIT 2:
GOOD NEWS
[/size]
Now it's allmost working, just a litle problem with the camera when i kill the enemy. Take a look at the picture
Ok
Looks like the problem is now in the rast_deathcam.sqs maybe change some of the codes inside to make it work
EDIT 3:
GOOD NEWS AGAIN
[/size]
Ok, i did some change in the rast_deathcam.sqs to:
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
Now we can see that man die in slow motion, hehe
But another problem, how do i turn OFF the Camara again? I only have "Death Cam On" in the Action Menu., When i press it, than the camara goes on and shows the Enemy Death cam all the time, how do i add the turn off in the Class UserActions in my config.cpp file?? hehe
BIG THANKS TO YOU ALL
[/size][/color]
Maximus-Sniper
EDIT 4:
Hi again
Ok i fix the "Death Cam Off" and now it's work to turn of and On the Enemy Death Cam
So my Class UserActions in config.cpp looks like this now:
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}";
};
The Action Menu looks like this:
;D ;D ;D
But another thing, i know i have seen it befor, when you press the "......On" than it will show automatic "....OFF" As you see now, the "Death Cam On/OFF" are inn the Action Menu at the same time.. Maybe one of you may know how i can fix that??
Thanks :
Maximus-Sniper