Arma Scripters,
Trying to debug this little script I am adding to our teams mission.
We use Ghost missions and this is a parameter within the mission.
I added in description.ext
class PARAM_AimSway
{
title = "Player Aiming Sway:";
values[] = {100,0,1,2,3,4,5,6,7,8,9,10};
texts[] = {"default","0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"};
default = 2;
};
I added a initplayerlocal.sqf
if !("PARAM_AimSway" call BIS_fnc_getParamValue == 100) then {
call fnc_ghst_aimsway;
player addEventHandler ["Respawn", {call fnc_ghst_aimsway}];
};
fn_functions.sqf
//Aim Sway Mod
fnc_ghst_aimsway = {
params ["_player","_coef"];
_coef = ("PARAM_AimSway" call BIS_fnc_getParamValue) / 10;
_player setCustomAimCoef _coef;
_player setUnitRecoilCoefficient 0.2 + _coef;
};
I have made the latest changes and the script is working well.
Any other suggestions for optimizing, for my learning would be great.
Thanks for any help.
Reed