Tnx for all help, i got it work like 50%
I canche a bit in my init.sqs :
player addaction ["Bullet camera on","\Bab\script\TrackEryx.sqs"]
player addEventHandler ["fired",{_this exec "\Bab\script\fired.sqs"}]
track = false
PosBullcam = preprocessFile "PosBullCam.sqf"
validation = false
Please help if you see something wrong
Then a chance a bit in fired.sqs:
_Missile = nearestObject [vehicle(player), _this select 4]
? isNull _Missile : exit
? !(track) : exit
_ok = createDialog "Speed"
? !(_ok) : exit
setAccTime 0.01
_Type= typeOf _Missile
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
sliderSetRange [100, 0.01, 1]
sliderSetSpeed [100, 0.5, 2.0]
sliderSetPosition [100, 0]
sliderSetRange [99, 0.1, 1]
sliderSetPosition [99, 1]
sliderSetSpeed [99, 0.1, .25]
sliderSetRange [98, -180, 180]
sliderSetPosition [98, 0]
sliderSetSpeed [98, 0.5, 2.0]
sliderSetRange [97, -15000, 15000]
sliderSetPosition [97, 0]
sliderSetSpeed [97, 0.5, 2.0]
#loop
? _Type != typeOf _Missile : goto "end"
[ _Missile ,_cam,(sliderPosition 99),(sliderPosition 98),(sliderPosition 97)] call PosBullcam
setAccTime (sliderPosition 100)
? ctrlvisible 100 : goto "loop"
#End
? (getpos _cam select 1 == 0) or !(_Type != typeOf _Missile) : goto "SkipSlowEnd"
setAccTime 0.2
~0.5
#SkipSlowEnd
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
closedialog 0
setAccTime 1
exit
help if something is wrong her
Then a use a another script from another bullet cam (TrackEryx.sqs) :
_ID = _this select 2
player removeAction _ID
? !(track) : track = true ; player addaction ["Bullet camera off", "\Bab\script\TrackEryx.sqs"];exit
? (track) : track = false; player addaction ["Bullet camera on", "\Bab\script\TrackEryx.sqs"]
use it to got the Bullet Cam on and Off in the user menu in game.. If work help need
The i past the worse file
PosBullCam.sqf ) :
private ["_Cam", "_Zoom", "_Missile", "_Rotate ","_zView"];
_Missile = _This select 0;
_Cam = _this select 1;
_Zoom = _This select 2;
_Rotate = _This select 3;
_zview = _This select 4;
_cam camsetpos getpos _missile;
_cam camSetFov _Zoom;
_cam camsettarget [((getpos _missile select 0) + ((sin (getdir _Missile + _Rotate ))* 5000 )), (getpos _missile select 1)+ (((cos (getdir _Missile +_Rotate ))* 5000 )) , ((getPos _Missile select 2)+(velocity _Missile select 2))+ _zview ];
_cam camcommit 0;
ctrlSettext [101,format["%1 meters",(_Missile distance player)]] ;
ctrlSettext [102,format["%1 m/s",( (Speed _missile )* 1000 ) / 3600 ]];
ctrlSettext [103,format["%1", velocity _Missile ]];
got lot of error in upper screen in game. But this work if i copy this in to ,y mission folder.. How do i add this in my addon.
And my load.sqf look like this:
_this call loadFile "\BAB\script\PosBullCam.sqf"
i'am not sure if this are correct.
About the description.ext, then i have allwas to copy inn mission folder, but thats ok..If i gor every thing to work i only need to copy one file into mission folder.. thats ok, but only need a help for the rest of the files over here..
Tnx allot again for the help i got
So how do the class eventhandles look if somebody got it to work??
Here is mine:
class EventHandlers
      {
   init="[_this select 0] exec ""\BAB\Script\Init.sqs"" ; MyFunction=loadFile ""\BAB\script\PosBullCam.sqf"" ; [""Buba""] Call MyFunction";
      };
do i have to change something here???
Tnx for your all answares and help... it's work like 50% better than 0%
BACK AGAIN
It'a seems to be 80% ok now, i Only got one error: I still have to copy PosBullCam.sqf into my mission folder
How do i add the PosBullCam.sqf file into my addon???
I only change a bit inn init.sqs:
player addaction ["Bullet camera on","\Bab\script\TrackEryx.sqs"]
player addEventHandler ["fired",{_Missile = nearestObject [vehicle(player), _this select 4];[_missile] exec "\Bab\script\fired.sqs"}]
track = false
PosBullcam = preprocessFile "PosBullCam.sqf"
validation = false
And set back the orginal fired.sqs:
_Missile = _this select 0
? isNull _Missile : exit
? !(track) : exit
_ok = createDialog "Speed"
? !(_ok) : exit
setAccTime 0.01
_Type= typeOf _Missile
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
sliderSetRange [100, 0.01, 1]
sliderSetSpeed [100, 0.5, 2.0]
sliderSetPosition [100, 0]
sliderSetRange [99, 0.1, 1]
sliderSetPosition [99, 1]
sliderSetSpeed [99, 0.1, .25]
sliderSetRange [98, -180, 180]
sliderSetPosition [98, 0]
sliderSetSpeed [98, 0.5, 2.0]
sliderSetRange [97, -15000, 15000]
sliderSetPosition [97, 0]
sliderSetSpeed [97, 0.5, 2.0]
#loop
? _Type != typeOf _Missile : goto "end"
[ _Missile ,_cam,(sliderPosition 99),(sliderPosition 98),(sliderPosition 97)] call PosBullcam
setAccTime (sliderPosition 100)
? ctrlvisible 100 : goto "loop"
#End
? (getpos _cam select 1 == 0) or !(_Type != typeOf _Missile) : goto "SkipSlowEnd"
setAccTime 0.2
~0.5
#SkipSlowEnd
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
closedialog 0
setAccTime 1
exit
So how do i fix the PosBullCam.sqf into my addon and cpp file?
If i remove the PosBullCa,.sqf from my mission folder i got this error before i got into my mission : "script PosBullCam.sqf not found"
How do i fix that?? I dont want to copy the file into my mission folder every time a make a new mission..
Someone have a answare??
Please help me