Page MenuHomeFeedback Tracker

BIS_fnc_PIP Fails with existing camera
New, NormalPublic

Description

On the BIS wiki an example for a method to use the BIS_fnc_PIP function is as follows

["rendertarget0",_myCamera] call BIS_fnc_PIP;

I created a camera "cam" and upon calling the function I receive a division by zero error on line 79 of the function.

line 79 and context looks like this.

#70 //--- Force terminate
# 71	if (count _input <= 1) exitwith {
# 72		([] call bis_fnc_rscLayer) cuttext ["","plain"];
# 73		_params = missionnamespace getvariable ( _renderTarget);
# 74		if !(isnil "_params") then {
# 75			_heli = _params select 0;
# 76			_camera = _params select 1;
# 77			_actions = _params select 2;
# 78			
# 79			**removeMissionEventHandler ["Loaded", _actions select 2];**
# 
# 			_camera cameraeffect ["terminate","back"];
# 			camdestroy _camera;
# 
# 			missionnamespace setvariable [ _renderTarget,nil];
# 		};
# 		objnull
# 	};
#

Personally, and I really have no idea what I'm talking about i think that it should read either _params select 2 or actions select 0 because I'm pretty sure there is no 3rd element in _actions but please correct me if I'm wrong

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Visual-GUI
Steps To Reproduce

In vr create a cam with yourcam = "camera" camCreate [your array]

(optional)
// create a screen to make sure your camera is working

screen = "Land_Billboard_F" createVehicle position player;
screen setObjectTexture [0, "#(argb,512,512,1)r2t(broadcast,1)"];

// make camera broadcast

cam cameraEffect ["Internal" , "Back", "broadcast"];

// attach camera to player
yourcam attachTo [player, [0,.6,0], "Head"];

// run debug console and try to call the function
["rendertarget0",yourcam] call BIS_fnc_PIP;

Event Timeline

Therious created this task.Nov 16 2016, 4:13 AM
Therious updated the task description. (Show Details)Nov 16 2016, 4:46 PM
Therious changed Severity from Minor to Major.