Jump to content
Sign in to follow this  
Joe98

player setCustomAimCoef 1 What does 1 mean?

Recommended Posts

I like the number 28.

 

What does the number 1 mean in the command?

 

.

 

 

 

Share this post


Link to post
Share on other sites

setCustomAimCoef is used to reduce weapon sway

 

1= full sway

0= no sway

 

my personal setting is 0.5

along with player setUnitRecoilCoefficient 0.6

Share this post


Link to post
Share on other sites

How do you set this up in the game for multiplayer?

Share this post


Link to post
Share on other sites

i do this like this

init.sqf

fnc_setPgunHandle = {

	params ["_player"];

		
	private _pstamina = paramsArray select 0;
	private _pwrecoil = (paramsArray select 1)/100;
	private _pwsway	= (paramsArray select 2)/100;
	
	if (_pstamina == 0) then {
	
		_player enableStamina false;
		
	};
	
	_player setUnitRecoilCoefficient _pwrecoil;
	_player setCustomAimCoef _pwsway;
};

description.ext

 

class Params	{
		
	class PStamina	{
		//0
		title = "Enable/Disable Player's Stamina";
		values[] = {0,1};
		texts[] = {"Disable","Enable"};
		default = 0;

	};
	
	class PRecoil	{
		//1
		title = "Player's Weapon Recoil";
		values[] = {10,40,70,100};
		texts[] = {"No recoil","Poor recoil","Standart recoil","Intensive recoil"};
		default = 70;

	};
	
	class PAimCoef	{
		//2
		title = "Player's Weapon Sway";
		values[] = {10,40,70,100};
		texts[] = {"No sway","Poor sway","Standart sway","Intensive sway"};
		default = 70;

	};
};

initPlayerLocal.sqf

 

[player] call fnc_setPgunHandle;
player addEventHandler ["Respawn",{

		null = [_this select 0, _this select 1] spawn {
		
			params ["_player", "_body"];
			
				[_body] joinSilent grpNull;
				hideBody _body;
				waitUntil {sleep 0.5; alive _player};
				[_player] call fnc_setPgunHandle;
		};
}];

 

Share this post


Link to post
Share on other sites

instead of just adding to init, how could I add to my scripts folder and then call from the init?

Share this post


Link to post
Share on other sites

put

	params ["_player"];

		
	private _pstamina = paramsArray select 0;
	private _pwrecoil = (paramsArray select 1)/100;
	private _pwsway	= (paramsArray select 2)/100;
	
	if (_pstamina == 0) then {
	
		_player enableStamina false;
		
	};
	
	_player setUnitRecoilCoefficient _pwrecoil;
	_player setCustomAimCoef _pwsway;

in somescriptfile.sqf and in initPlayerLocal.sqf:

 

fnc_setPgunHandle =  call compileFinal preprocessFileLineNumbers "somescriptfile.sqf";
[player] call fnc_setPgunHandle;
player addEventHandler ["Respawn",{

		null = [_this select 0, _this select 1] spawn {
		
			params ["_player", "_body"];
			
				[_body] joinSilent grpNull;
				hideBody _body;
				waitUntil {sleep 0.5; alive _player};
				[_player] call fnc_setPgunHandle;
		};
}];

 

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  

×