Migal 1 Posted February 21, 2022 Hi, I need to change a local function inside a BIS function, namely: BIS_fnc_modulesector. It contains a local function: _fnc_threat = { private ["_veh","_coef","_scanCrew","_threat","_score"]; _veh = _this select 0; _coef = _this select 1; _scanCrew = _this select 2; _threat = getarray (configfile >> "cfgvehicles" >> typeof _veh >> "threat"); _score = 0.1; //--- Use non-zero value, so even objects with threat[]={0,0,0} can capture {_score = _score + _x} foreach _threat; _score = _score * _coef; if (isplayer _veh) then {_score = _score * _costPlayersLocal;}; if (_scanCrew) then { { _score = _score + ([_x,_costInfantry,false] call _fnc_threat); if (isplayer _x) then {_score = _score * _costPlayersLocal;}; } foreach (crew _veh - [_veh]); }; _score }; Where called _scanCrew parameter is always passed "true" but I want is always as false. Is it possibile? This is the function called by Sector Module. Thank you Share this post Link to post Share on other sites
pierremgi 4902 Posted February 21, 2022 First of all, BI doesn't add "always TRUE" condition, so _scanCrew is a variable returning TRUE or FALSE along with this entry parameter. Such variable can be defined at start or during game, even changed inside a loop, Idk. The fact is you can't override such local function by your own fnc... because it's local. You need to rewrite the whole moduleSector function, say your OWN_fnc_moduleSector, and think about all other functions which called BIS_fnc_moduleSector... Roughly, that means you need to create your own module (so mod), or script instead of using the BI module. A lot of work. Share this post Link to post Share on other sites
Migal 1 Posted February 22, 2022 22 hours ago, pierremgi said: First of all, BI doesn't add "always TRUE" condition, so _scanCrew is a variable returning TRUE or FALSE along with this entry parameter. Such variable can be defined at start or during game, even changed inside a loop, Idk. The fact is you can't override such local function by your own fnc... because it's local. You need to rewrite the whole moduleSector function, say your OWN_fnc_moduleSector, and think about all other functions which called BIS_fnc_moduleSector... Roughly, that means you need to create your own module (so mod), or script instead of using the BI module. A lot of work. Thank you. I got it working, created a custom module and got it call a modified BIS function. 1 Share this post Link to post Share on other sites