Camera scripting resources sought

Home / INDEX / Map Editing and Scripting / Camera scripting resources sought

This topic contains 7 replies, has 4 voices, and was last updated by  OJ 2 years, 11 months ago.

  • Creator
  • #11789

    Hi guys,

    I’ve been getting more esoteric in my searches all week, but still – all the camera scripting information I can find describes using camera.sqs which Arma 3 reports as either old or depricated (message a bit quick for me to fully read on-screen, something about a bis_fnc something?)

    While it’s a shame there’s no tutorials I can find on how to do this, what I’m really having difficulty finding is the reference material I need to script intro (and/or mid-mission or outro) cutscenes into missions.

    Without locating what I’m actually after, my current approach is to literally start from the beginning… I’m currently referencing:

    The main difficulty is this is my first foray into ArmA3 scripting (and my first into scripting in general for… 7 years. I’m not so much rusty, as seized.)

    I’m wondering if anyone knows of any resource specific to my actual needs and it’s simply my google-fu that’s failed me?

    So… anyone have a post of WD40 available? πŸ˜‰

    – OJ

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
  • #11790

    If you dig up some old missions from fata and look in the scripts dir you will see an intro.sqf although not a tutorial it will be at least an example. Pretty sure its using that camera.sqs from memory not there is anything new.

    I did have a video that explained it very well but i will have to dig that one up from the abyss if i can find it at all. Search youtube!


    Problem being all my results on youtube searches/links tell me to use camera.sqs and its outputs, but ArmA3 editor doesn’t let me follow those tutorials as it states it’s old and I have to use bis_fnc_camera instead. I can’t find documentation on how to do so yet πŸ™‚

    I will see if I can dig up some old fata missions, but am dubious of success due to my new PC. Data “may” be lost. I’ll know better this weekend when I dig back into it.

    – OJ

    Commands are at bottom to get the camera to come up.

    Camera.sqs info
    I am sure this still works unless it s recently patched out thing?

    Tutorial on camera in arma3

    Its alpha video might help but?

    Possible alternative untested as not on pc
    [] execVM “a3\functions_f\Debug\fn_camera.sqf”;

    fiddly fiddly shit doing cam stuff in arma took me hours to make a basic intro back on fata, gl!


    Thanks buddy I’ll check that vid out tonight. Not one I’d previously found.

    – OJ


    Yeah, SQS scripts are the predecessor to SQF scripts and they still work. Anything you can do it SQS you can also do in SQF. It uses primarily the same scripting commands, but different syntax (formatting/symbols and stuff). To run an SQS:
    exec ‘camera.sqs’;

    To give you the gyst of how to do camera scripting from scratch, here’s how it works (in SQF script). Will make a camera move between 2 markers while zooming in on a third. All this is client side code.

    _camstart = (getMarkerPos ‘camstart’) vectorAdd [0,0,10]; //add 10m so the camera’s not in the ground.
    _camend = (getMarkerPos ‘camend’) vectorAdd [0,0,10]; //add 10m so the camera’s not in the ground.
    _camtarget = (getMarkerPos ‘camtarget’);

    //create the camera
    _camera = “camera” camCreate _camstart;

    //set the camera’s start state
    _camera camSetTarget _camtarget;
    _camera camSetPos _camstart;
    _camera camSetFOV 0.7;

    //commit the changes. Some changes won’t do anything unless commited. 0 means do it instantly.
    _camera camCommit 0;

    //make the camera active (put it on the screen)
    _camera cameraEffect [“internal”, “back”];

    //give the camera it’s destination
    _camera camPreparePos _camend;
    _camera camPrepareFOV 0.3;

    //make the camera go to it’s ‘prepared’ pos, etc over the next 10 seconds
    _camera camCommitPrepared 10;

    //sleep to wait for the camera to do its thing. You could have things like AI animations in here rather than just 1 long sleep.
    sleep 10;

    //switch back to the normal players camera
    player cameraEffect [“terminate”,”back”];

    //destroy the camera
    camDestroy _camera;

    Lots of other commands you can use here:

    • This reply was modified 2 years, 11 months ago by  Lecks.

    That is awesome Lecks. πŸ™‚


    That’s a great start thanks Lecks, all this help should have me back to where I need to be.

    When I’d tried the exec β€˜camera.sqs’; call on unit init, it didn’t work and instead threw the “blah blah use bis_fnc_camera” message instead, which eventually found “a” way to call it, (not in any real usable way) which subsequently gave different outputs to the click-copy method described in docs I’d found so far… and so I quickly became lost trying to find the sqf/fnc stuff I needed from that point πŸ™‚

    I’ll speak out again if I encounter further confusion.

    – OJ

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.