Jump to content
Sign in to follow this  
scario

Camear following missile?

Recommended Posts

As the topic says, is it possbile to let "the camera" follow a missile (like a Maveric)? It should look very nice if you could follow the missiles way against the target, and in slowmotion see when it hits.. Mwohaha  crazy.gif  tounge.gif  

No, but seriously, is it possible? With some modified camscript or something?

Edit: Yes, I know the topic is wrong spelled.. mad.gif  wink.gif

Share this post


Link to post
Share on other sites

There's a script on OFPEC that does just this. I suggest checking it out in the Editors Depot

If it's not what you're looking for, you can probably modifiy it to work.

Share this post


Link to post
Share on other sites

Maybe this is a stupid way to do it but it works.

This is how I did it:

put the following in the player units initfield:

this addeventhandler ["Fired",{this exec "test.sqs"}]

put the following in a script called test.sqs:

setacctime 0.2

_Y=-1

_Z=0

_Speed=0

_Bullet=nearestobject [vehicle player,"BulletSniperW"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSingleW"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletBurstW"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSilencedSingleW"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSilencedBurstW"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"UZI"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet7_6W"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"G36a"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Steyr"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"GlockS"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Beretta"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"RevolverBullet"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"GrenadeHand"]

?Alive _Bullet:_Y=-5;_Z=5;goto "Next"

_Bullet=nearestobject [vehicle player,"Grenade"]

?Alive _Bullet:_Y=-5;_Z=3;goto "Next"

_Bullet=nearestobject [vehicle player,"MortarShell"]

?Alive _Bullet:_Y=-5;_Z=3;goto "Next"

_Bullet=nearestobject [vehicle player,"AA"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"CarlGustav"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"LAW"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSingleE"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletBurstE"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletFullAutoE"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet7_6E"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSniperE"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Bizon"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Tokarev"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Skorpion"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"9K32"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"AT4"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"BulletSingleG"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletBurstG"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BulletFullAutoG"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"KozliceBall"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"KozliceShell"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"CZ75"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"HuntingRifle"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet7_6"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Heat73"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Shell73"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"AT3"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Cannon30AP"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Cannon30HE"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet12_7"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Heat120"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Shell120"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Cannon25HE"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Heat105"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Shell105"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet4x23"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Heat125"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Shell125"]

?Alive _Bullet:_Y=-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet4x20"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet30W"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"Maverick"]

?Alive _Bullet:-2;_Z=1;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet30A10"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"LaserGuidedBomb"]

?Alive _Bullet:_Y=-5;_Z=3;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet30"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"HellfireApach"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Hellfire"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Zuni"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Rocket57"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"Bullet30E"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"AT6"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"BISBulletCamel"]

?Alive _Bullet:goto "Next"

_Bullet=nearestobject [vehicle player,"BISGrenadeCamel"]

?Alive _Bullet:-1;_Z=0.2;goto "Next"

_Bullet=nearestobject [vehicle player,"CH29T"]

?Alive _Bullet:-2;_Z=1;goto "Next"

#Next

_cam ="Camera" camcreate [0,0,0]

_cam cameraeffect ["Internal","Back"]

_cam camsettarget _Bullet

_cam camsetrelpos [0,_Y,_Z]

_cam camcommit 0

#Loop

?Alive _Bullet:_cam camsetrelpos [0,_Y,_Z]

?Alive _Bullet:_cam camcommit 0

?Alive _Bullet:titletext [format ["Distance at impact: %1 meters\nTop speed: %2 km/h",_Bullet distance Player,_Speed],"PLAIN DOWN",0.3]

?speed _Bullet > _Speed:_Speed=speed _Bullet

?(alive _Bullet):goto "Loop"

~1

_cam cameraeffect ["Terminate","BACK"]

camdestroy _cam

~0.5

setacctime 1

exit

Share this post


Link to post
Share on other sites

ouch. Why not replace all that stuff at the top with?

_bullet = nearestobject [(_this select 0), (_this select 4)]

(or is it _this select 3, I forget)

Share this post


Link to post
Share on other sites

Dinger's right...good idea...

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"Fired" string:weapon,string:muzzle,string:mode,string:ammo<span id='postcolor'>

Share this post


Link to post
Share on other sites

Is it possible to switch from plane view to missile view then? I don't want to crash while i look at the missile

Share this post


Link to post
Share on other sites

You could probably work something out. Like an action that switches back to the plane (i.e just kill the missile camera)

Share this post


Link to post
Share on other sites

ouch!  

that's a very powerfull script!!!!!!    wow.gif

so nice!

i triyed to use it whith a plane or armored but it does'nt work    confused.gif  too bad, it will be very nice to follow a missile from a plane 'till his target biggrin.gif

maybye there a little thing to change but i'm too bad in script editing  crazy.gif

Inq Wiper can you look at this??

plz plz

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  

×