Jump to content
Sign in to follow this  
hicks88

Bullet cam

Recommended Posts

Does anyone happen to have a bullet cam script lying about, i tried using bulletcam II but the dialogs screw up, they show up as triangles. I am trying to do an artillery script but my shells keep dissappearing so i really need one

Share this post


Link to post
Share on other sites
Could you define "bulletcam"?

He most likely means, a camera that follows a bullet fired.

Like the missilecam in the Spectator Script.

Share this post


Link to post
Share on other sites

Wait until the weapon fired a shot, then get the bullet by nearestObject "BulletName" and use switchCamera "External".

myAbrams addEventHandler[ "FIRED",{ ( (getPos myAbrams )nearestObject "Sh_120_SABOT" )switchCamera "EXTERNAL"; ( (getPos myAbrams )nearestObject "Sh_120_SABOT" )spawn{ waitUntil{ isNull _this }; vehicle player switchCamera "Internal"; } } ];

€: Lol, amazing, just tried it out and found out that the sabot even bounces on the water surface like a stone - nice stuff physics.

Share this post


Link to post
Share on other sites
Does anyone happen to have a bullet cam script lying about, i tried using bulletcam II but the dialogs screw up, they show up as triangles. I am trying to do an artillery script but my shells keep dissappearing so i really need one

Also try Kronski's Portable Target Range.

I forgot to mention that.

It has a bulletcam.

Share this post


Link to post
Share on other sites

So hicks, did you try my solution - does it fit your requirements?

Share this post


Link to post
Share on other sites

I did, worked like a charm. I also (for video purposes) altered it slightly for slowmo

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sol1 addEventHandler[ "FIRED",{ ( (getPos sol1 )nearestObject "R_M136_AT" )switchCamera "INTERNAL";setAccTime .35;( (getPos sol1 )nearestObject "R_M136_AT" )spawn{ waitUntil{ isNull _this };setAcctime .15;setacctime 1; vehicle player switchCamera "Internal"; } } ];

<span style='color:red'>Thanks!</span> Also a question: 'Is there a way to keep the camera on the target after impact?' Keep in mind I'm a total noob with this stuff, yet.    smile_o.gif  

I tried changing it to this

Quote[/b] ]sol1 addEventHandler[ "FIRED",{ ( (getPos sol1 )nearestObject "R_M136_AT" )switchCamera "INTERNAL";setAccTime .35;( (getPos sol1 )nearestObject "R_M136_AT" )spawn{ <span style='color:red'>waitUntil{ isAlive != _target</span> };setAcctime .15;setacctime 1; vehicle player switchCamera "Internal"; } } ];

...but the cam would just stay stuck on the BMP I had sol1  target until the next round from sol1 was fired.

help.gif

Share this post


Link to post
Share on other sites

[...] setAcctime .15;setacctime 1; [...]

Make a decision there wink_o.gif if you want to keep the camera focused on the targeted bmp for example you have to have the bmp in a variable first. Assuming your targeted BMP is bmp1 then it goes

[...] spawn

{

waitUntil{ isNull _this };

setacctime 1;

bmp1 switchCamera "External";

}

Share this post


Link to post
Share on other sites

Thanks for the quick reply!  What I was trying to do was follow the projectile, then once the target is hit, keep the camera on it for 2-3 seconds then return the camera to the player.

However changing the code to

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sol1 addEventHandler[ "FIRED",{ ( (getPos sol1 )nearestObject "R_M136_AT" )switchCamera "External";setAccTime .30;( (getPos sol1 )nearestObject "R_M136_AT" )spawn{ waitUntil{ isNull _this};setacctime .50;bmp1 switchCamera "External"} } ];

gives you the full HUD of the BMP including the players in the squad of the BMP. Using this code<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sol1 addEventHandler[ "FIRED",{ ( (getPos sol1 )nearestObject "R_M136_AT" )switchCamera "External";setAccTime .30;( (getPos sol1 )nearestObject "R_M136_AT" )spawn{ waitUntil{ isNull _this};setacctime 1;target switchCamera "External"} } ];

provided the right result, except it does not return the camera to the player. Maybe if there was a time parameter with the addition of 'vehicle player switchcamera "Internal", after the 'target switchcam...' it might work?

Share this post


Link to post
Share on other sites

Well, 'switchCamera' is a very special thing in ArmA - not always right for ones purpose... If it doesnt fit go back to the roots and work with cams... like that!

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sol1 addEventHandler[ "FIRED",

{

setAccTime .30;

( (getPos sol1 )nearestObject "R_M136_AT" )switchCamera "External";

( (getPos sol1 )nearestObject "R_M136_AT" )spawn

{

waitUntil{ isNull _this };

setacctime .50;

_obj_cam = "Camera" camCreate[ 0,0,0 ];

_obj_cam camSetTarget bmp1;

_obj_cam camSetRelPos[ -10 + random 20,-10 + random 20,6 ];

_obj_cam camCommit 0;

_obj_cam cameraEffect[ "EXTERNAL","BACK" ];

sleep 5;

_obj_cam cameraEffect[ "TERMINATE","BACK" ];

camDestroy _obj_cam;

};

} ];

Share this post


Link to post
Share on other sites

Thank you very much for your time. I'll give it a try!

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  

×