wika_woo 182 Posted May 11, 2007 Hi, When any type of missile is launched from a hind or any other aircraft, what camera script would i use ?.. I want the Camera to follow the missile  all the way to it's target. I tried searching. please help. Thanks. Share this post Link to post Share on other sites
mandoble 1 Posted May 11, 2007 Use a fired eventhandler to get the missile object and then execute this, for example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;mando_predicam.sqs ;Parameters: ; Object to follow ; Horizontal camera distance to object ; Angle from where the camera tracks the object (0 = same dir as object, 90 right, 180 back, 270 left) ; Vertical camera distance to object ; Maximum time to keep the camera ON in seconds ; Return to previous camera true/false ; ;Example: ;Follow plane1, and try to keep the camera 10 meters back to the object and 2 meters higher: ;[plane1, 10, 180, 2]exec"mando_predicam.sqs" _unit = _this select 0 _rangex = _this select 1 _ang = _this select 2 _rangey = _this select 3 _maxtime = _this select 4 _return = _this select 5 _ground = "logic" createVehicle [0,0,0] _delay = 0.05 _posu = getPos _unit showCinemaBorder false _angf = (getDir _unit)+_ang _pos = [(_posu select 0)+sin(_angf)*_rangex, (_posu select 1)+cos(_angf)*_rangex, (_posu select 2)+_rangey] _cam = "camera" camcreate [0, 0, 0] _cam cameraeffect ["internal", "back"] _cam camSetPos _pos _cam camSetTarget _unit _cam camSetFov 1.0 _cam camCommit 0 mando_predicam = true _timecur = 0.0 #follow _posu = getPos _unit _asl1 = getPosASL _unit select 2 _vel = velocity _unit _asl2 = _asl1+(_vel select 2)*_delay + _rangey _angf = (getDir _unit)+_ang _posc = [(_posu select 0)+(_vel select 0)*_delay+sin(_angf)*_rangex, (_posu select 1)+(_vel select 1)*_delay+cos(_angf)*_rangex,_asl2] _ground setPos [_posc select 0, _posc select 1, 0] _asl3 = getPosASL _ground select 2 _alt = _asl2 - _asl3 _posc = [_posc select 0, _posc select 1, _alt] _cam camSetPos _posc _cam camCommit (_delay+0.5) ~_delay _timecur = _timecur + _delay ?(_timecur < _maxtime) && mando_predicam && (!isNull _unit):goto "follow" ~2 #endcamera ?_return:_cam cameraeffect ["terminate", "back"] camDestroy _cam deleteVehicle _ground ~2 mando_predicam = false exit Share this post Link to post Share on other sites
wika_woo 182 Posted May 11, 2007 woah.. Sorry for being noobish. I've never edited a mission in that kind of style. Only using the in-game editor. You'll have to tell how to do it, by embedding it into the mission file using notepad?.. Share this post Link to post Share on other sites
mandoble 1 Posted May 11, 2007 Then you may start looking for scripting in the BIS WIKI. Share this post Link to post Share on other sites