Jump to content
kouli2fraiz

Need help with the Live feed module

Recommended Posts

Simple situation :

  • 4 Players (player1,2,3,4)
  • 1 drone (drone)
  • 1 AI (unit)

I want the players to have a life feed of the drone watching the ennemy.

Sync

  • Target > unit
  • Source > drone
  • Init > all players (only synced objects)

The problem

 

When the mission begins, all players get the live feed, BUT :

Only the host of the server,(no matter what slot you take) get the right broadcast, other units get a footage of .... their ass (the cam is on the ground and pointing sky, following their position)

 

Little offtopic questions

 

  1. First I synced the source to the drone but I was having footage of the 3rd view drone, so the drone was in front of the camera, then I attached an invisible object to the drone with -2 in altitude and I putted it as source, is there a way to put the camera in first person so I dont have to do this ?
  2. Can I enlarge de live feed screen?
  3. If I want to zoom in the live feed, how ? I have tried to put this but it's not working.
  4. BIS_liveFeed camPrepareFOV x;

      4. How can I change the screen position ?

Share this post


Link to post
Share on other sites

If I remember correctly, the header of the functions says that the live feed was not designed for multiplayer. So making it work will probably quite tricky.

Share this post


Link to post
Share on other sites

Most likely you'll have to write a script that initiates the feed for each player locally, start by copying the module code and initializing it per player.

Share this post


Link to post
Share on other sites

Example of no modules, just using BIS liveFeed functions..

//initPlayerLocal.sqf
h = [] spawn {

   //Where drone and unit are the names given in the editor
    _drone = drone;
    _target = unit;

    [ getPos _drone vectorAdd [ 0, 0, -1 ], _target, player ] call BIS_fnc_liveFeed;
    
    waitUntil{ !isNil "BIS_livefeed" };
    
    //Question 1 : Attach camera below drone
    BIS_livefeed attachTo [ _drone, [ 0, 0, -1 ] ];
    
    //Question 2 & 4
    fnc_resizePIP = {
        params[ "_dispPos", "_scale" ];
        
        _display = uiNamespace getVariable "BIS_fnc_PIP_RscPIP";
        _basePos = ctrlPosition ( _display displayCtrl 2300 );
        _baseScale = ctrlScale ( _display displayCtrl 2300 );
        _scaleDiff = _scale / _baseScale;
        {
            _ctrl = _x;
            _pos = ctrlPosition _ctrl;
            _pos resize 2;
            {
                _diff = _x - ( _basePos select _forEachIndex );
                _newpos = ( _dispPos select _forEachIndex ) + ( _diff * _scaleDiff );
                _pos set [ _forEachIndex, _newpos ];
            }forEach _pos;
            _ctrl ctrlSetPosition _pos;
            _ctrl ctrlSetScale _scale;
            _ctrl ctrlCommit 0;
        }forEach allControls _display;
        
        [ _basePos, _baseScale ]
    };

    sleep 5;
    
    //Set feed display size and position
    _origFeedPosScale = [ [ 0, 0 ], 5 ] call fnc_resizePIP;
    
    //Zoom camera
    for "_zoom" from 2 to 0 step -0.1 do {
        //Question 3
        BIS_liveFeed camPrepareFov _zoom;
        BIS_livefeed camCommitPrepared 0;
        sleep 0.5;
    };

    sleep 5;

    //Set feed display back to default size and position
    _origFeedPosScale call fnc_resizePIP;
};

Share this post


Link to post
Share on other sites

I've already tried that with modules, I will try with no modules.

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

×