Jump to content
Sign in to follow this  
JCataclisma

[SOLVED-ish] How to cycle between custom landing/parking cameras with camCreate / createDisplay ?

Recommended Posts

CURRENTLY CODE IN MESSAGES BELLOW

 

Edited by JCataclisma
more specific title

Share this post


Link to post
Share on other sites

Despite the low quality, the video can give the idea of the actual "Landing Camera" being used.

 

Edited by JCataclisma

Share this post


Link to post
Share on other sites

Ok, by reading another not-so-old topic here in forums, I could make some improvements and managed to find out a way to "kill" the display image, so to free that slot by pressing any chosen inputAction key.

The specific topic is linked at the end of this message, and bellow are the lines that are actually working for my landing/parking camera scripts.
These are the lines in the script executed specifically for the Kajman:

Spoiler

private _landaction = _currentVehicle addAction
	[
		"<t color='#f0cc0f'>Landing Cam</t>",
		{

[] execVM "code\scripts\cameras\kajmanLand.sqf";
		},
		nil,
		0,
		false,
		true,
		"",
		"_this == _target turretUnit [-1]",
		10,
		false
	];

private _superiorAction = _currentVehicle addAction
	[
		"<t color='#00000f'>Superior Cam</t>",
		{

[] execVM "code\scripts\cameras\kajmanSuperior.sqf";
		},
		nil,
		0,
		false,
		true,
		"User17",
		"_this == _target turretUnit [-1]",
		10,
		false
	];


Here is the content for "kajmanLand.sqf" (called from the Landing Cam addAction):
 

Spoiler


_ctrl1 = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscPicture", -1];
_ctrl1 ctrlSetPosition [-0.6, 0.8, 0.55, 0.55];
_ctrl1 ctrlSetText "#(argb,512,512,1)r2t(rtt1,1.0)";
_ctrl1 ctrlCommit 0;
_cam1 = "camera" camCreate [0, 0, 0];
_cam1 attachTo [(vehicle player), [1.7,-4,-2.5]];
_cam1 setDir 330;
_cam1 setVectorUp [0,0.15,0.75];
_cam1 cameraEffect ["Internal", "Back", "rtt1"];
_cam1 camCommand "MANUAL OFF";
hint "Press [NUM-5] (center-view) to free camera slot";

waitUntil {inputAction "lookCenter" > 0};
hint "";
camDestroy _cam1 ;
player cameraEffect ["TERMINATE", "BACK"];


Finally, content for "kajmanSuperior.sqf":
 

Spoiler



_ctrl1 = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscPicture", -1];
_ctrl1 ctrlSetPosition [-0.6, 0.8, 0.55, 0.55];
_ctrl1 ctrlSetText "#(argb,512,512,1)r2t(rtt1,1.0)";
_ctrl1 ctrlCommit 0;
_cam1 = "camera" camCreate [0, 0, 0];
_cam1 attachTo [(vehicle player), [0,0,16]];
_cam1 setVectorUp [0,0.99,0.01];
_cam1 cameraEffect ["Internal", "Back", "rtt1"];
_cam1 camCommand "MANUAL OFF";
hint "Press [NUM-5] (center-view) to free camSlot";

waitUntil {inputAction "lookCenter" > 0};
hint "";
camDestroy _cam1 ;
player cameraEffect ["TERMINATE", "BACK"];

 

 

 



Forum link with the solving help:
https://forums.bohemia.net/forums/topic/218524-addaction-to-manual-camera/

Edited by JCataclisma

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  

×