Nordin 0 Posted September 22, 2010 I am having trouble with BIS arty module in multiplayer on my dedicated server. I am using a GUI to set target, battery and fire mission and it works fine in SP but when I test it on a dedicated server nothing happens. I know that the code could be optimized but it will have to wait until I have solved all the issues Having trouble with setFuel, land, addMagazine aswell... Works fine to call for transport but the heli wont land to pick me up _sam_cas land "LAND"; works fine in SP but not in MP.... Arty code if ((_missionType == 2)) then { if (((_targetposx == 0) or (_targetposy == 0)) and (_distance == 0)) exitWith {player globalChat "SAM Support: No valid target information"}; if (_direction > 360) exitWith {player globalChat "SAM Support: No valid direction"}; _battery = lbCurSel 513003; if (_battery < 0) exitWith {player globalChat "SAM Support: No unit selected"}; _batterydname = ((sam_batterys select _battery) select 0); _batteryname = ((sam_batterys select _battery) select 1); _batterytype = ((sam_batterys select _battery) select 2); _sam_delay = (parseNumber ctrlText (_dlg displayCtrl 513005)); _sam_shells = (parseNumber ctrlText (_dlg displayCtrl 513006)); _sam_dispersion = (parseNumber ctrlText (_dlg displayCtrl 513007)); if (sam_dispersion == 1) then { if (_sam_dispersion != 0) then { if (_sam_dispersion < 25) then {_sam_dispersion = 25 + random 50}; [_batteryname, true] call BIS_ARTY_F_SetShellSpawn; [_batteryname, _sam_dispersion] call BIS_ARTY_F_SetDispersion; }; }; _targetPos = [_targetposx, _targetposy, _sam_zulu]; _calpos = [_calposx, _calposy, _sam_zulu]; if ((_batteryname getVariable "ARTY_ONMISSION")) then {player globalChat format["SAM Support: %1 not available", _batterydname];} else { if (_batterytype == 2) then { if (samam == 0) then { sam_sammo = "HE"}; if (samam == 1) then { sam_sammo = "WP"}; if (samam == 2) then { sam_sammo = "ILLUM"}; if (samam == 3) then { sam_sammo = "SMOKE"}; if (samam == 5) then { sam_sammo = "laser"}; if (samam == 4) then { sam_sammo = "sadarm"}; }; if(_batterytype == 1) then { if (samam == 0) then { sam_sammo = "HE"}; if (samam == 1) then { sam_sammo = "WP"}; if (samam == 2) then { sam_sammo = "ILLUM"}; if (samam == 3) then { sam_sammo = "FAIL"}; if (samam == 4) then { sam_sammo = "FAIL"}; if (samam == 5) then { sam_sammo = "FAIL"}; }; if(_batterytype == 3) then { if (samam == 0) then { sam_sammo = "HE"}; if (samam == 1) then { sam_sammo = "FAIL"}; if (samam == 2) then { sam_sammo = "FAIL"}; if (samam == 3) then { sam_sammo = "FAIL"}; if (samam == 4) then { sam_sammo = "FAIL"}; if (samam == 5) then { sam_sammo = "FAIL"}; }; if (sam_maxshells < _sam_shells) exitWith {player globalChat format["SAM Support: To many shells, max shells %1", sam_maxshells]}; if (sam_sammo == "FAIL") exitWith {player globalChat format["SAM Support: This munition type not available for %1", _batterydname]}; _heTemplate = ["IMMEDIATE", sam_sammo, _sam_delay, _sam_shells]; _pos = if ((_distance) != 0) then {_calpos} else {_targetpos}; [_batteryname, _pos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission; player globalChat format ["SAM support: Sending firemission to %1", _batterydname];}; sleep sam_artymission_delay + (random 30); hint format ["%1", _batteryname]; if (_batteryname getVariable "ARTY_BADTARGET") then {player globalChat format["%1: Firemission canceled, cant hit target pos", _batterydname]} else { if (isNil "_sam_arty_calls") then{ player setVariable ["sam_arty_calls", 0, true];}; player setVariable ["sam_arty_calls", ((player getVariable "sam_arty_calls") + 1), true]; hint "2"; if (_sam_arty_calls > sam_arty_calls) exitWith {player globalChat "SAM Support: No calls for artillery left"}; player globalChat format["%1: Firemission approved", _batterydname]; _sam_arty_calls = player getVariable "sam_arty_calls"; waitUntil {_batteryname getVariable "ARTY_SPLASH"}; player globalChat format["%1: Splash", _batterydname]}; }; Share this post Link to post Share on other sites
Andy455 11 Posted September 22, 2010 Firstly as you are using: _sam_cas land "LAND"; have you added a helipad at your location? As on the wiki it states: Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in ArmA). For the artillery script, what exactly doesn't work? It is much easier for us to help you if we know which part isn't working. Share this post Link to post Share on other sites
Nordin 0 Posted September 22, 2010 Doh! Locality: Will not do anything unless executed on the server in MP. Share this post Link to post Share on other sites