Jump to content

Recommended Posts

So I did a search and found lots of older posts to my needs, however, since one of the many ArmA 3 updates the older script I had successfully used is now NOT functioning.

 

I am looking for a script to limit the use of third person view when on foot.  If in vehicles players can access 3rd person (cars, planes and choppers).

 

Does anyone have a link or a script that I can use that we know for sure works with the latest ArmA 3 stable build?

 

Thanx in advance :)

 

REAPER

Share this post


Link to post
Share on other sites

I use this:
 

/*
	Function: HALs_fnc_limitThirdPerson
	Author: HallyG
	Limits third person use to vehicles only.

	Arguments(s):
	None

	Return Value:
	None
	
	Example:
	// initPlayerLocal.sqf
	call HALs_fnc_limitThirdPerson;
__________________________________________________________________*/
if (!hasInterface) exitWith {};
if (!isNil "HALs_tp_cameraView") exitWith {};

HALs_tp_cameraView = cameraView;
HALs_tp_oldVehicle = vehicle player;

addMissionEventHandler ["EachFrame", {
	if (inputAction "PersonView" > 0 || !(cameraView isEqualTo HALs_tp_cameraView) || !(vehicle player isEqualTo HALs_tp_oldVehicle)) then {
		if (cameraOn isEqualTo vehicle player) then {
			if (isNull objectParent player) then {
				if (cameraView isEqualTo "EXTERNAL") then {
					player switchCamera "INTERNAL";
				};
			};
		};
	};
			
	HALs_tp_cameraView = cameraView;
	HALs_tp_oldVehicle =  vehicle player;
}];

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanx fellas - I will try the code from HallyG as the Armaholic link is not working for me. 

 

I will update later with my findings :)

Share this post


Link to post
Share on other sites
On 5/26/2017 at 10:21 PM, HallyG said:

I use this:
 


/*
	Function: HALs_fnc_limitThirdPerson
	Author: HallyG
	Limits third person use to vehicles only.

	Arguments(s):
	None

	Return Value:
	None
	
	Example:
	// initPlayerLocal.sqf
	call HALs_fnc_limitThirdPerson;
__________________________________________________________________*/
if (!hasInterface) exitWith {};
if (!isNil "HALs_tp_cameraView") exitWith {};

HALs_tp_cameraView = cameraView;
HALs_tp_oldVehicle = vehicle player;

addMissionEventHandler ["EachFrame", {
	if (inputAction "PersonView" > 0 || !(cameraView isEqualTo HALs_tp_cameraView) || !(vehicle player isEqualTo HALs_tp_oldVehicle)) then {
		if (cameraOn isEqualTo vehicle player) then {
			if (isNull objectParent player) then {
				if (cameraView isEqualTo "EXTERNAL") then {
					player switchCamera "INTERNAL";
				};
			};
		};
	};
			
	HALs_tp_cameraView = cameraView;
	HALs_tp_oldVehicle =  vehicle player;
}];

 

 

where do I put this script? I am kind of new to scripting so I am quite confused. Or if you could tell me what ACE module it is that would work for me as well

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

×