Jump to content
Sign in to follow this  
Metall

Loop script, camera.sqs lock?

Recommended Posts

1st question) Hi, im just testing different animations and they do work, only i was wondering how to make an animation such as character putting hands behind his back to keep the animation going for as long as i want to, cause even with safe behaviour on, the animation finishes in 2 secs and the character stands defaultly again. As i understand a loop script is needed. How does it look like? How do i use it?

2md question) When in the editor im testing around the "camera.sqs" thing. But i was wondering, how do i start a preview so the camera is  locked on a moving vehicle and is viewabale from the vehicle's perspective. For example when i start a preview i want the cam to be on a moving truck plane or chopper flying to the waypoint i gave, so while its flying i can move around cam and try different views and angles (sort of like the gen view u know, move cam 360 round the object). Because when i try to fill in the camera.sqs thing the camera starts on the ground if i inserted the code in the flying plane's directory and obviously putting it in a soldier on the ground directory would be useless cause i dnt wanna see the plane flying by and zoom in to it or whatever, i want the cam to be already locked on the flying plane from a plane's perspective. visual example would be great.

Thanks.

Share this post


Link to post
Share on other sites

Hi metall was going to reply yesterday but had to rush out sorry.

In answer to question 2 the best thing i can suggest is to download Troopmon

Troopmon

This will enable you to view any unit on the map from its outside view (and much more). Once you get an idea of the type of views and angles you want in your cutscene do this.

Create yourself on the map then create a harrier (flying) name the harrier plane1.

Create a trigger that is set to activation "none" and in the condition box write startcount, set the countdown boxes to 20 secs each and in the on activation box write endplaneview = true.

Save the map as camtest or anything.

Alt tab out of the game and find the mission in your ArmA user missions.

Open notepad and copy and paste the following in to it.

titlecut ["","Black in",10]

_camera = "camera" camcreate [0,0,0]

startcount=true

#loop

_camera cameraeffect ["internal", "back"]

_camera camsettarget plane1

_camera camPrepareFOV 0.700

_camera camsetrelpos [0,10,5]

_camera camcommit 0

? (endplaneview) : goto "nextstep"

goto "loop"

Save this as cam1.sqs

Now when you call this script (ie if you want the camera straight away put in your units init field, this exec "cam1.sqs")

it will attach a camera to the harrier by looping.

To change the position of the camera the line you want is _camera camsetrelpos [0,10,5]

The first number is Left and Right (use - for left) so 5 would be 5 metres right.

The second number is Forward and Backward of the vehicle (-for Backward)

The last number is Up and Down (- for Down)

Keeping previewing and changing till you get the desired position.

The way the loop ends is in your trigger that you created.

The script you notice has a line startcount = true. This tells the trigger to start counting the 20 secs or whatever time you put in the countdown boxes.

When the time is up (notice the endplaneview in your script)

Endplaneview becomes true and the camera is unlocked from the plane.

The way i then create another camera angle is to put in the triggers on activation box (after endplaneview = true) ; plane1 exec "cam2.sqs" This then moves to the next camera (when you create it)

Remember if you are using another looping cam you need another trigger but this should be endplaneview2 = true, also changing it in the cam2 script.

This may not be the best way of ending loops but its always worked for me.

Any probs let me know

Best regards Bootleg

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  

×