Results 1 to 4 of 4

Thread: Missile Cam From any Air vehicle?

Hybrid View

  1. #1
    Master Gunnery Sergeant
    Join Date
    Feb 26 2007
    Location
    England.
    Posts
    1,076
    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.




  2. #2
    Warrant Officer Mandoble's Avatar
    Join Date
    Nov 10 2005
    Location
    Madrid, Spain
    Posts
    2,021
    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&#58;
    ; Object to follow
    ; Horizontal camera distance to object
    ; Angle from where the camera tracks the object &#40;0 = same dir as object, 90 right, 180 back, 270 left&#41;
    ; Vertical camera distance to object
    ; Maximum time to keep the camera ON in seconds
    ; Return to previous camera true/false
    ;
    ;Example&#58;
    ;Follow plane1, and try to keep the camera 10 meters back to the object and 2 meters higher&#58;
    ;&#91;plane1, 10, 180, 2&#93;exec&#34;mando_predicam.sqs&#34;

    _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 = &#34;logic&#34; createVehicle &#91;0,0,0&#93;
    _delay = 0.05
    _posu = getPos _unit
    showCinemaBorder false
    _angf = &#40;getDir _unit&#41;+_ang
    _pos = &#91;&#40;_posu select 0&#41;+sin&#40;_angf&#41;*_rangex, &#40;_posu select 1&#41;+cos&#40;_angf&#41;*_rangex, &#40;_posu select 2&#41;+_rangey&#93;


    _cam = &#34;camera&#34; camcreate &#91;0, 0, 0&#93;
    _cam cameraeffect &#91;&#34;internal&#34;, &#34;back&#34;&#93;

    _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+&#40;_vel select 2&#41;*_delay + _rangey
    _angf = &#40;getDir _unit&#41;+_ang
    _posc = &#91;&#40;_posu select 0&#41;+&#40;_vel select 0&#41;*_delay+sin&#40;_angf&#41;*_rangex, &#40;_posu select 1&#41;+&#40;_vel select 1&#41;*_delay+cos&#40;_angf&#41;*_rangex,_asl2&#93 ;
    _ground setPos &#91;_posc select 0, _posc select 1, 0&#93;
    _asl3 = getPosASL _ground select 2
    _alt = _asl2 - _asl3
    _posc = &#91;_posc select 0, _posc select 1, _alt&#93;
    _cam camSetPos _posc
    _cam camCommit &#40;_delay+0.5&#41;
    ~_delay
    _timecur = _timecur + _delay
    ?&#40;_timecur &#60; _maxtime&#41; && mando_predicam && &#40;&#33;isNull _unit&#41;&#58;goto &#34;follow&#34;
    ~2
    #endcamera
    ?_return&#58;_cam cameraeffect &#91;&#34;terminate&#34;, &#34;back&#34;&#93;
    camDestroy _cam
    deleteVehicle _ground
    ~2
    mando_predicam = false
    exit
    [/QUOTE]

  3. #3
    Master Gunnery Sergeant
    Join Date
    Feb 26 2007
    Location
    England.
    Posts
    1,076
    Author of the Thread
    woah.. Sorry for being noobish.

    I&#39;ve never edited a mission in that kind of style. Only using the in-game editor.

    You&#39;ll have to tell how to do it, by embedding it into the mission file using notepad?..






  4. #4
    Warrant Officer Mandoble's Avatar
    Join Date
    Nov 10 2005
    Location
    Madrid, Spain
    Posts
    2,021
    Then you may start looking for scripting in the BIS WIKI.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •