Jump to content
Sign in to follow this  
KEVINMGXP

how to make cam scripts

Recommended Posts

I tried to set up a cam script in the mission editor of ArmA2, for this I am using the line this exec "camera.sqs"

this worked fine in the past the thing right now is I am confused about the scripting part in the past i just used this.

http://community.bistudio.com/wiki/Camera.sqs

setting up my camera editor script

First you need to make a mission edtior map to your mission folder so I take chernarus in this example and save it project001

1/ In the editor i dropped a unit away form the shot area which was the player.

2/ then a game logic on the shot area where i put in the game logic init line: this exec "camera.sqs"

3/ then I take a cam position I like and just press left mouse and the paste it in notepad.

4/ I save the notepad then for example as scene1.sqs and place it in my mission folder that i made project001.

So the script will look basic like this: (this is just an example how i did it in the past) at least thats what I think how I did it now at this very moment I am not entierly sure anymore.

titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]

;=== 14:51:29
_camera camPrepareTarget [-55102.08,84473.38,19.82]
_camera camPreparePos [3724.91,3606.90,0.45]
_camera camPrepareFOV 0.500
_camera camCommitPrepared 0
@camCommitted _camera

~30

_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;

5/ normally i then take several shots and do the above and after a few shots it would look like this, I change the target init line in the game logic to this exec "scene1.sqs" and hit preview

titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]

showcinemaborder false;

;comment "10:36:28";
_camera camPrepareTarget [100715.07,30271.86,28013.98];
_camera camPreparePos [8662.93,2898.78,54.57];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0
@camCommitted _camera

~30

;comment "10:38:19";
_camera camPrepareTarget [101138.14,40858.19,-3997.54];
_camera camPreparePos [8709.33,2918.15,36.55];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0

~30

;comment "10:39:34";
_camera camPrepareTarget [57489.33,-72549.63,-43607.45];
_camera camPreparePos [8725.89,2979.38,31.98];
_camera camPrepareFOV 0.892;
_camera camCommitPrepared 0

~30

;comment "10:40:39";
_camera camPrepareTarget [45393.99,-90039.72,1858.80];
_camera camPreparePos [8730.37,2981.31,12.29];
_camera camPrepareFOV 0.472;
_camera camCommitPrepared 0

~30

;comment "10:41:22";
_camera camPrepareTarget [34740.94,-93290.68,-7584.93];
_camera camPreparePos [8740.22,2958.53,1.58];
_camera camPrepareFOV 0.401;
_camera camCommitPrepared 0

_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;

hence the showcinemaborder false; normally this need to make the cinema border go away but that does not work anymore while it worked perfect in the past. also notice the ~30 this it is the time it takes to get to the next shot, but now comes the strange thing it jumps to the next screen what I want is that it will move to that location without the jump like the cam is on the move, I am not sure how I can explain that any better.

the thing is or I ether forgot how to do it or I just doing it completely wrong so I am trying to find that out, i need the scripting because without it I am inefective for arma video editing. I can do with actors standing but some shots need to be scripted in just like i want to.

ah crap this is going to take such a long time, I forgot the damn basics :cry: anyone that can help me trough to refresh my mind again. I feel like an idiot :o

Kind regards

Edited by KBourne

Share this post


Link to post
Share on other sites

So, I can see you're still working in sqs format. I think it'll be better to work in new format sqf. Because I found out there could be this issues in older format like sqs. According my experiences because I had similar problems and I solved them by this. Just try it.

Share this post


Link to post
Share on other sites
So, I can see you're still working in sqs format. I think it'll be better to work in new format sqf. Because I found out there could be this issues in older format like sqs. According my experiences because I had similar problems and I solved them by this. Just try it.

yep just found that out while i was chatting with a clan member of hours. It took some time to get it figured out but he gave me the lines that I was missing, and putted it in a solid template script to work with so ill be fine ,thanks for responding :)

kind regards

Share this post


Link to post
Share on other sites

How about posting that template of yours here so others can use it and learn from it as well?

Share this post


Link to post
Share on other sites

I find that all my camera scripts of old using .sqs ended up stopping working for some reason and now I onlyu make camera scenes with sqf.

The differences are very small really between sqs and sqf "sqf" is the modern way of doing anything in Arma.

showcinemaborder false;

[s];comment "10:36:28";[/s]
_camera camPrepareTarget [100715.07,30271.86,28013.98];
_camera camPreparePos [8662.93,2898.78,54.57];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0[color="Red"];[/color]
[s]@camCommitted _camera[/s]

[s]~30[/s]

First of all you can scrap the ;comment timeline and simply use //Write whatever you want here mainly for notes in your scenes so you know what shot is what etc.

Make sure every line of code ends in a ;

@camCommitted_camera is now replaced with

waitUntil {camCommitted _camera};

and ~30 would now be sleep 30;

So the .sqf version would look like this

showcinemaborder false;

//Camera looking at car driving by
_camera camPrepareTarget [100715.07,30271.86,28013.98];
_camera camPreparePos [8662.93,2898.78,54.57];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

sleep 30;

Share this post


Link to post
Share on other sites
How about posting that template of yours here so others can use it and learn from it as well?

Here you go, it still works in SQS but the shots are more difficult to manipulate.

titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]

showcinemaborder false

;comment "10:36:28";
_camera camPrepareTarget [100715.07,30271.86,28013.98];
_camera camPreparePos [8662.93,2898.78,54.57];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0
@camCommitted _camera

~10

;comment "10:38:19";
_camera camPrepareTarget [101138.14,40858.19,-3997.54];
_camera camPreparePos [8709.33,2918.15,36.55];
_camera camPrepareFOV 0.700;
[color="Red"]_camera camCommitPrepared 5[/color]

[color="Red"]~10 [/color]

;comment "10:39:34";
_camera camPrepareTarget [57489.33,-72549.63,-43607.45];
_camera camPreparePos [8725.89,2979.38,31.98];
_camera camPrepareFOV 0.892;
_camera camCommitPrepared 7

~10

;comment "10:40:39";
_camera camPrepareTarget [45393.99,-90039.72,1858.80];
_camera camPreparePos [8730.37,2981.31,12.29];
_camera camPrepareFOV 0.472;
_camera camCommitPrepared 8

~10

;comment "10:41:22";
_camera camPrepareTarget [34740.94,-93290.68,-7584.93];
_camera camPreparePos [8740.22,2958.53,1.58];
_camera camPrepareFOV 0.401;
_camera camCommitPrepared 9

_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;

_camera camCommitPrepared 5 When you want to let the camera move from the first location to the next you can give it a time code here if you keep it at 0 it will jump strait away to the next shot

~10 This is the time it will take before it will go to the next shot

This format is in SQS you can replace the shots with your shots and it will work however take note when you want to preview don't do it on the mission map but on the intro map or the cinema border will still show up. so it is best to take the shots directly in your intro section of the editor. The only thing you need to do now is just play around with it to take nice cam shots and tape it with fraps or a similar program for in game capturing. After that you can edit this in a program like camtasia studio or sony vegas pro, there are a few free versions out there to that you can use.

or like koni said this is a good way to go also ... for some reason you can manipulate the cam better in SQF like targeting a car or a shopper, in SQS it seems to have problems with that kind of directions....

So the .sqf version would look like this

showcinemaborder false;

//Camera looking at car driving by
_camera camPrepareTarget [100715.07,30271.86,28013.98];
_camera camPreparePos [8662.93,2898.78,54.57];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

sleep 30;

Kind regards

Edited by KBourne

Share this post


Link to post
Share on other sites
I find that all my camera scripts of old using .sqs ended up stopping working for some reason and now I onlyu make camera scenes with sqf.

I think there are more things which stopped working in the old sqs :D

and BIS is recommending to use only sqf format since Arma 2

Share this post


Link to post
Share on other sites

I'm still using sqs syntax for cam scripts I have no problem whatsoever with it.

Just my 2 cents.

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  

×