Jump to content
Sign in to follow this  
dr_zakharotta

Missile chase script needed for SA6 Kuh

Recommended Posts

Hey folks,

I created a script for camera.sqs for a SA6 tank firing a missile onto a F-35 but cant seem to get the camera to follow the missile after it's launch, using the attach to object in the camera.sqs file.

This is my file:

x is the jet and y is the SA6 AA missile.

showCinemaBorder false;

titleCut["", "BLACK IN",5];
_camera = "camera" camCreate [0,0,0];
_camera cameraEffect ["Internal", "Back"];


showCinemaBorder false;


;=== 22:48:16
_camera camSetTarget y
_camera camSetrelPos [0,9,2]
_camera camPrepareFOV 0.900
_camera camCommitPrepared 0
@camCommitted _camera

~15

goto"nextscene"

#nextscene

;=== 23:06:58
_camera camSetTarget x
_camera camSetrelPos [2,2,2]
_camera camPrepareFOV 0.800
_camera camCommitPrepared 30
@camCommitted _camera



~60
player cameraEffect ["Terminate", "Back"]
camDestroy _camera;
end1=true;
exit;

This is a video you should watch @ 720p I made for the script and how it behaves:

n6HIK4hnHcI

I liked the second take with the missile in flight , smoke and steering towards F-35, but I want to get a back to front view like a tracking view, or bulletcam view (possible?:j:) for the missile itself

In the code portion

#nextscene

;=== 23:06:58
_camera camSetTarget x
_camera camSetrelPos [2,2,2]
_camera camPrepareFOV 0.800
_camera camCommitPrepared 30
@camCommitted _camera

I have attached the camera to the Jet and set a timer for 60 seconds to run before the cam is destoyed, this is not depicted in my video. tracking not attached :butbut:

Any ideas?

Share this post


Link to post
Share on other sites

I don't actually do anything in SQS (100% SQF for me), but based on a script from Mr Murray's famed guide to Arma 1, this might help.

_time = time + 15
#LOOP
_camera camSetTarget y
_camera camSetrelPos [0,9,2]
_camera camPrepareFOV 0.900
_camera camCommit 0
@camCommitted _camera
? time > _time : goto "nextscene"
goto "LOOP"

#nextscene

I'm not 100% sure if that will work, but I do something similar in SQF for my camera work. I would show you, but it is totally not compatible with SQS and would just confuse things :D

---------- Post added at 05:59 PM ---------- Previous post was at 05:44 PM ----------

One other thing, you might want to check mando_predicam which comes with Mando's Missiles addon. It's a very sophisticated trigonometric script that follows things like missiles, and just needs to be called with a few parameters. This is quoted from that script:

;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"

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  

×