Tuna

Disable UAV Thermal?

7 posts in this topic

How can one disable the uav thermal. I have tried a couple ways with no success curious if anyone has figured it out?

Share this post


Link to post
Share on other sites
// disableTheral.sqf
// by CRE4MPIE
// ver 0.2
// 2015-04-29 11:44pm
// contributions from BIStudio Forums, edited by CRE4MPIE


_layer = 85125; 
_launchers =["launch_I_Titan_short_F","launch_O_Titan_short_F","launch_B_Titan_short_F","launch_Titan_short_F","launch_Titan_F","launch_O_Titan_F","launch_I_Titan_F","launch_B_Titan_F"];  // launcher array


while {true} do 
{ 
if (currentVisionMode player == 2) then																		// check for TI Mode
{
	if (currentweapon player in _launchers) then															// check if player has launcher as current weapon
		{ 																										
            _layer    cutText ["Thermal Imaging OFFLINE!.","BLACK",-1];										// Blackout screen with Text
			playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
		}
	else
	{
	if (alive (getConnectedUAV player)) then																// check if player is connected to a UAV			
		{																											
            _layer    cutText ["Thermal Imaging OFFLINE while connected to a UAV terminal!.","BLACK",-1];	// Blackout screen with Text
			playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
		}
		else
		{
			setViewDistance 1250;																			// set viewdistance for all other thermals																					
			waituntil {currentVisionMode player != 2};
			setViewDistance -1;																				// reset viewdistance to default
		}
	};	
};	
	
	sleep 1;
};

A little function written by @CRE4MPIE on BI forums.

Edited by WD-40
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

For the newbies like myself; where does one add this? In the Mission Config.cpp file, under CfgExileCustomCode and place the SQF in the mission?

Share this post


Link to post
Share on other sites
On 4/15/2016 at 10:32 AM, [VA]Strikes said:

For the newbies like myself; where does one add this? In the Mission Config.cpp file, under CfgExileCustomCode and place the SQF in the mission?

 

I have mine under Exile.Namalsk\Scripts\disablethermal.sqf
Then in the init.sqf I have [] execVM "Scripts\disablethermal.sqf";

1 person likes this

Share this post


Link to post
Share on other sites

I have tested this script and it doesn't stop players from spamming "N" to quickly change between vision options.

Share this post


Link to post
Share on other sites

An updated version of the above script, to utilise Exiles threading system

Spoiler

thermalsOffline = 
{ 
	if (currentVisionMode player == 2) then
	{
		_layer = 85125; 
		_launchers =["launch_O_Vorona_brown_F","launch_O_Vorona_green_F","launch_I_Titan_short_F","launch_O_Titan_short_F","launch_B_Titan_short_F","launch_Titan_short_F","launch_Titan_F","launch_O_Titan_F","launch_I_Titan_F","launch_B_Titan_F","HMG_static","Laserdesignator","Laserdesignator_02","Laserdesignator_03"];		
		if (currentweapon player in _launchers) then
		{
			["ErrorTitleOnly", ["Thermal Imaging OFFLINE"]] call ExileClient_gui_toaster_addTemplateToast;
			_layer	cutText ["FLIR Mode Disabled. Please Turn off Thermals.","BLACK FADED",999];
			waituntil {currentVisionMode player != 2};
			_layer cutText ["", "PLAIN"];
		}
		else
		{
			if (alive (getConnectedUAV player)) then		
			{
				["ErrorTitleOnly", ["Thermal Imaging OFFLINE"]] call ExileClient_gui_toaster_addTemplateToast;
				_layer cutText ["FLIR Mode Disabled. Please Turn off Thermals.","BLACK FADED",999];
				waituntil {currentVisionMode player != 2};
				_layer cutText ["", "PLAIN"];
			}
			else
			{
				vehicle player disableTIEquipment true;
			};
		};	
	};
};
[
	0.1,
	thermalsOffline,
	[],
	true,
	false
]
call ExileClient_system_thread_addTask;

 

and just call it from initPlayerLocal, no need to run it in init (client and server)

call compileFinal preprocessFileLineNumbers "DisableThermal.sqf";


 

Edited by MGTDB
3 people like this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.