Okay guys I did as u said now. I did the private thing and I m running the config lookups only if the weapon is changed now.   The whole thing isnt too haevy I think. My laptop has the minimal performance to run arma 3 (Intel I3 Core with Intel onboard graphics) and that script is running on 7 ms with non propelled ammo and 8 ms with self propelled ammo.   @revo I did not implement ur count advice because thats only running one time if the weapon was changed.   I split that in 2 scripts now and here they are:   pred_tar_pos.sqf /* Author: Sarogahtyp File: pre_tar_pos.sqf Description: Calculates the postion of a moving target at the time the bullet of shooters current magazine is arriving at target. Works with most self propelled weapons, too. Works with vehicles. Tested without MODs only - vanilla style. Known issues: Not working with RPG but will be fixed soon. Parameter(s): 0: target - the object the shooter wants to shoot at - default is the player 1: shooter - the one who wants to shoot at target - default is the nearest target to shooters crosshair Returns: position - position of the target when the current bullet will reach it */ params [["_target", cursorTarget], ["_shooter", player]]; if(!(alive _shooter) or (isNull _target) or (isNull _shooter)) exitWith {(_target modelToWorld [0,0,1.2])}; private _flight_dist = 0; private _burned_out = false; private _prop_started = false; private _burn_time = 0; private _time_diff = 0; private _last_time = 0; private _last_dist = 0; private ["_weapon", "_magazine", "_init_speed_gun", "_init_speed_mag", "_air_friction", "_init_time", "_max_speed", "_thrust", "_thrust_time", "_rel_speed", "_distance", "_dist_step", "_last_speed", "_last_accel", "_new_dist", "_term", "_new_time", "_new_speed", "_new_accel"]; _shooter = vehicle _shooter; _weapon = currentWeapon _shooter; _magazine = currentMagazine _shooter; if ( (count IR_gun_mag_ammo_cfg) > 1 ) then { if ((_weapon != IR_gun_mag_ammo_cfg select 0) or (_magazine != IR_gun_mag_ammo_cfg select 1)) then { [_shooter] call fnc_handle_configs; }; } else { [_shooter] call fnc_handle_configs; }; _init_speed_gun = IR_gun_mag_ammo_cfg select 2; _air_friction = IR_gun_mag_ammo_cfg select 3; _init_time = IR_gun_mag_ammo_cfg select 4; _max_speed = IR_gun_mag_ammo_cfg select 5; _thrust = IR_gun_mag_ammo_cfg select 6; _thrust_time = IR_gun_mag_ammo_cfg select 7; _rel_speed = ((velocity _target) vectorDiff (velocity _shooter)); if((vectorMagnitude _rel_speed) > 0) exitWith { _distance = _target distance _shooter; _dist_step = _distance / (10 * diag_fps); _last_speed = _init_speed_gun; _last_accel = _air_friction * _init_speed_gun ^ 2; while {_last_dist < _distance} do { _new_dist = _last_dist + _dist_step; //calculate time from last position to actual position (_time_diff) if (_last_accel < 0) then // standard case - bullet is decelerated by airflow { _term = _last_speed / _last_accel; _time_diff = -1 * sqrt (_term ^ 2 + 2 * _dist_step / _last_accel) - _term; } else { if(_last_accel == 0) then //maybe no value for air friction stored in config then we have just t=s/v { _time_diff = _dist_step / _last_speed; } else // positive acceleration should happen if a propulsion is burning only { _term = _last_speed / _last_accel; _time_diff = sqrt (_term ^ 2 + 2 * _dist_step / _last_accel) - _term; }; }; _new_time = _time_diff + _last_time; _new_speed = _last_speed + _last_accel * _time_diff; if(_new_speed <= 0) exitWith {0}; _new_accel = _air_friction * _new_speed ^ 2; //calc air frictions influence to acceleration //check if bullet is a rocket and if propulsion should accelerate if((_max_speed > 30) and (!_burned_out) and (_last_time > _init_time)) then { if(!_prop_started) then { _prop_started = true; _burn_time = diag_tickTime + _thrust_time; } else { if(diag_tickTime > _burn_time) then { _burned_out = true; }; }; _new_accel = _new_accel + _thrust; }; _last_dist = _new_dist; _last_time = _new_time; _last_speed = _new_speed; _last_accel = _new_accel; }; ((_target modelToWorld [0,0,1.2]) vectorAdd (_rel_speed vectorMultiply _last_time)) }; (_target modelToWorld [0,0,1.2]) handle_configs.sqf params ["_shooter"]; private _speed_coef_muzzle = 1; private _air_fric_fact = -0.002; private ["_weapon", "_magazine", "_init_speed_gun", "_init_speed_mag", "_ammo_class", "_air_friction", "_items", "_init_time", "_max_speed", "_thrust", "_thrust_time"]; _shooter = vehicle _shooter; _weapon = currentWeapon _shooter; _magazine = currentMagazine _shooter; _init_speed_gun = getNumber(configfile >> "CfgWeapons" >> _weapon >> "initSpeed"); _init_speed_mag = getNumber(configfile >> "CfgMagazines" >> _magazine >> "initSpeed"); _ammo_class = getText(configFile >> "CfgMagazines" >> _magazine >> "ammo"); _air_friction = getNumber(configFile >> "CfgAmmo" >> _ammo_class >> "airFriction"); _items = _shooter weaponAccessories _weapon; _init_time = getNumber(configFile >> "CfgAmmo" >> _ammo_class >> "initTime"); _max_speed = getNumber(configFile >> "CfgAmmo" >> _ammo_class >> "maxSpeed"); _thrust = getNumber(configFile >> "CfgAmmo" >> _ammo_class >> "thrust"); _thrust_time = getNumber(configFile >> "CfgAmmo" >> _ammo_class >> "thrustTime"); if((_init_speed_gun) < 0) then { _init_speed_gun = -1 * init_speed_gun * _init_speed_mag; }; if((_init_speed_gun) == 0) then { _init_speed_gun = _init_speed_mag; }; { if((_x find "muzzle") > -1) then { _temp_coef = getNumber(configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "MagazineCoef" >> "initSpeed"); _speed_coef_muzzle = if (_temp_coef !=0) then {_temp_coef}else{1}; }; } forEach _items; _init_speed_gun = _init_speed_gun * _speed_coef_muzzle; if(_air_friction > 0) then {_air_friction = _air_friction * _air_fric_fact;}; IR_gun_mag_ammo_cfg = []; IR_gun_mag_ammo_cfg pushBack _weapon; IR_gun_mag_ammo_cfg pushBack _magazine; IR_gun_mag_ammo_cfg pushBack _init_speed_gun; IR_gun_mag_ammo_cfg pushBack _air_friction; IR_gun_mag_ammo_cfg pushBack _init_time; IR_gun_mag_ammo_cfg pushBack _max_speed; IR_gun_mag_ammo_cfg pushBack _thrust; IR_gun_mag_ammo_cfg pushBack _thrust_time; Thanks alot for ur advises, that thing is done now :-)