BelgarionNL
Member-
Content Count
284 -
Joined
-
Last visited
-
Medals
Everything posted by BelgarionNL
-
LEA - Loadout Editor For ArmA 2 Combined Operations and ACE 2
BelgarionNL replied to major_shepard's topic in ARMA 2 & OA : Community Made Utilities
so what about respawning! and giving you the options again for choosing a loadout? -
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
1: like the titel says i want the helipads illuminated when a player returns to base at night! domination/ insurgency and then go out out when the helicopter's are grounded! 2: searchlight that goes on around dark and just keeps turning 360 degrees! preferably with no AI because i want to also use it for INSURGENCY! searched the forums but nothing popped!!! i am sure the know how is floating around on this forum ^^ Belgarion -
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
perhaps it was not smart to only give a small part of the script: //ÐœÐ¾Ñ Ð“Ð¾Ð»Ð³Ð¾Ñ„Ð°... westVehicleChecker = { private ["_vcl","_pos","_range","_driver","_plrs","_str"]; if (!alive MHQ && startLocation == MHQ) exitWith { _vcl = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", "MHQ"]; processInitCommands; HQ setDir (getDir vehicleServicePoint + 90); _pos = vehicleServicePoint modelToWorld [10,0,0]; _pos set [2,0]; HQ setPosATL _pos; }; if (startLocation != HQ) exitWith {}; _pos = startLocation modelToWorld [-1,12,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (helipad modelToWorld [0,0,0]) > 50) then { helipad setPosATL _pos; helipad setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [3,-15,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (helipad2 modelToWorld [0,0,0]) > 50) then { helipad2 setPosATL _pos; helipad2 setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [7,-5.5,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (armorpad modelToWorld [0,0,0]) > 50) then { armorpad setPosATL _pos; armorpad setDir (getDir startLocation - 0); }; _pos = startLocation modelToWorld [13,-9,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (vehicleServicePoint modelToWorld [0,0,0]) > 50) then { vehicleServicePoint setPosATL _pos; vehicleServicePoint setDir (getDir startLocation - 180); vehicleServicePoint setCaptive true; }; _pos = HQ modelToWorld [1.5,0,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (HQ modelToWorld [0,0,0]) > 50) then { bunker setPosATL _pos; bunker setDir (getDir HQ ); bunker setCaptive true; }; _pos = vehicleServicePoint modelToWorld [-8,0,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (repairarea modelToWorld [0,0,0]) > 50) then { repairarea setPosATL _pos; repairarea setDir (getDir vehicleServicePoint); }; _pos = startLocation modelToWorld [-2,-8,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (baseflag modelToWorld [0,0,0]) > 50) then { baseflag setPosATL _pos; baseflag setDir (getDir startLocation); }; _pos = startLocation modelToWorld [1,-7.5,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (HQ modelToWorld [0,0,0]) > 50) then { fieldHospital setPosATL _pos; fieldHospital setDir (getDir startLocation - 90); fieldHospital setCaptive true; }; _pos = startLocation modelToWorld [3,21,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall1 modelToWorld [0,0,0]) > 50) then { wall1 setPosATL _pos; wall1 setDir (getDir startLocation - 0); wall1 setCaptive true; }; _pos = startLocation modelToWorld [11,14,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall2 modelToWorld [0,0,0]) > 50) then { wall2 setPosATL _pos; wall2 setDir (getDir startLocation - 90); wall2 setCaptive true; }; _pos = startLocation modelToWorld [11,-15,-4]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall3 modelToWorld [0,0,0]) > 50) then { wall3 setPosATL _pos; wall3 setDir (getDir startLocation - 90); wall3 setCaptive true; }; _pos = startLocation modelToWorld [-5,-15,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall4 modelToWorld [0,0,0]) > 50) then { wall4 setPosATL _pos; wall4 setDir (getDir startLocation - 90); wall4 setCaptive true; }; _pos = startLocation modelToWorld [3,-22,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall5 modelToWorld [0,0,0]) > 50) then { wall5 setPosATL _pos; wall5 setDir (getDir startLocation - 0); wall5 setCaptive true; }; _pos = startLocation modelToWorld [-9,21,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall6 modelToWorld [0,0,0]) > 50) then { wall6 setPosATL _pos; wall6 setDir (getDir startLocation - 0); wall6 setCaptive true; }; _pos = startLocation modelToWorld [-12,12,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall7 modelToWorld [0,0,0]) > 50) then { wall7 setPosATL _pos; wall7 setDir (getDir startLocation - 90); wall7 setCaptive true; }; _pos = startLocation modelToWorld [-12,17.5,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall8 modelToWorld [0,0,0]) > 50) then { wall8 setPosATL _pos; wall8 setDir (getDir startLocation - 90); wall8 setCaptive true; }; _pos = startLocation modelToWorld [-12,8,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall9 modelToWorld [0,0,0]) > 50) then { wall9 setPosATL _pos; wall9 setDir (getDir startLocation - 90); wall9 setCaptive true; }; _pos = startLocation modelToWorld [-10,7,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall10 modelToWorld [0,0,0]) > 50) then { wall10 setPosATL _pos; wall10 setDir (getDir startLocation - 0); wall10 setCaptive true; }; _pos = startLocation modelToWorld [-8,-17,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall11 modelToWorld [0,0,0]) > 50) then { wall11 setPosATL _pos; wall11 setDir (getDir startLocation - 0); wall11 setCaptive true; }; _pos = startLocation modelToWorld [14,6.75,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (wall12 modelToWorld [0,0,0]) > 50) then { wall12 setPosATL _pos; wall12 setDir (getDir startLocation - 0); wall12 setCaptive true; }; _pos = startLocation modelToWorld [-2.5,-4.5,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (lookout1 modelToWorld [0,0,0]) > 50) then { lookout1 setPosATL _pos; lookout1 setDir (getDir startLocation - 270); lookout1 setCaptive true; }; _pos = startLocation modelToWorld [0,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor1_0 modelToWorld [0,0,0]) > 50) then { floor1_0 setPosATL _pos; floor1_0 setDir (getDir startLocation - 0); floor1_0 setCaptive true; }; _pos = floor1_0 modelToWorld [1.5,0,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor1_0 modelToWorld [1.5,0,0]) > 50) then { floor2_0 setPosATL _pos; floor2_0 setDir (getDir floor1_0 - 0); floor2_0 setCaptive true; }; _pos = startLocation modelToWorld [-1.5,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor3_0 modelToWorld [0,0,0]) > 50) then { floor3_0 setPosATL _pos; floor3_0 setDir (getDir startLocation - 0); floor3_0 setCaptive true; }; _pos = startLocation modelToWorld [3,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor4_0 modelToWorld [0,0,0]) > 50) then { floor4_0 setPosATL _pos; floor4_0 setDir (getDir startLocation - 0); floor4_0 setCaptive true; }; _pos = startLocation modelToWorld [-3,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor5_0 modelToWorld [0,0,0]) > 50) then { floor5_0 setPosATL _pos; floor5_0 setDir (getDir startLocation - 0); floor5_0 setCaptive true; }; _pos = startLocation modelToWorld [4.5,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor6_0 modelToWorld [0,0,0]) > 50) then { floor6_0 setPosATL _pos; floor6_0 setDir (getDir startLocation - 0); floor6_0 setCaptive true; }; _pos = startLocation modelToWorld [-4.5,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor7_0 modelToWorld [0,0,0]) > 50) then { floor7_0 setPosATL _pos; floor7_0 setDir (getDir startLocation - 0); floor7_0 setCaptive true; }; _pos = startLocation modelToWorld [6,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor8_0 modelToWorld [0,0,0]) > 50) then { floor8_0 setPosATL _pos; floor8_0 setDir (getDir startLocation - 0); floor8_0 setCaptive true; }; _pos = startLocation modelToWorld [-6,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor9_0 modelToWorld [0,0,0]) > 50) then { floor9_0 setPosATL _pos; floor9_0 setDir (getDir startLocation - 0); floor9_0 setCaptive true; }; _pos = startLocation modelToWorld [7.5,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor10_0 modelToWorld [0,0,0]) > 50) then { floor10_0 setPosATL _pos; floor10_0 setDir (getDir startLocation - 0); floor10_0 setCaptive true; }; _pos = startLocation modelToWorld [-7.5,12,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor11_0 modelToWorld [0,0,0]) > 50) then { floor11_0 setPosATL _pos; floor11_0 setDir (getDir startLocation - 0); floor11_0 setCaptive true; }; _pos = startLocation modelToWorld [0,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor1_1 modelToWorld [0,0,0]) > 50) then { floor1_1 setPosATL _pos; floor1_1 setDir (getDir startLocation - 0); floor1_1 setCaptive true; }; _pos = startLocation modelToWorld [1.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor2_1 modelToWorld [0,0,0]) > 50) then { floor2_1 setPosATL _pos; floor2_1 setDir (getDir startLocation - 0); floor2_1 setCaptive true; }; _pos = startLocation modelToWorld [-1.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor3_1 modelToWorld [0,0,0]) > 50) then { floor3_1 setPosATL _pos; floor3_1 setDir (getDir startLocation - 0); floor3_1 setCaptive true; }; _pos = startLocation modelToWorld [3,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor4_1 modelToWorld [0,0,0]) > 50) then { floor4_1 setPosATL _pos; floor4_1 setDir (getDir startLocation - 0); floor4_1 setCaptive true; }; _pos = startLocation modelToWorld [-3,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor5_1 modelToWorld [0,0,0]) > 50) then { floor5_1 setPosATL _pos; floor5_1 setDir (getDir startLocation - 0); floor5_1 setCaptive true; }; _pos = startLocation modelToWorld [4.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor6_1 modelToWorld [0,0,0]) > 50) then { floor6_1 setPosATL _pos; floor6_1 setDir (getDir startLocation - 0); floor6_1 setCaptive true; }; _pos = startLocation modelToWorld [-4.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor7_1 modelToWorld [0,0,0]) > 50) then { floor7_1 setPosATL _pos; floor7_1 setDir (getDir startLocation - 0); floor7_1 setCaptive true; }; _pos = startLocation modelToWorld [6,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor8_1 modelToWorld [0,0,0]) > 50) then { floor8_1 setPosATL _pos; floor8_1 setDir (getDir startLocation - 0); floor8_1 setCaptive true; }; _pos = startLocation modelToWorld [-6,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor9_1 modelToWorld [0,0,0]) > 50) then { floor9_1 setPosATL _pos; floor9_1 setDir (getDir startLocation - 0); floor9_1 setCaptive true; }; _pos = startLocation modelToWorld [7.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor10_1 modelToWorld [0,0,0]) > 50) then { floor10_1 setPosATL _pos; floor10_1 setDir (getDir startLocation - 0); floor10_1 setCaptive true; }; _pos = startLocation modelToWorld [-7.5,13.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor11_1 modelToWorld [0,0,0]) > 50) then { floor11_1 setPosATL _pos; floor11_1 setDir (getDir startLocation - 0); floor11_1 setCaptive true; }; _pos = startLocation modelToWorld [0,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor1_2 modelToWorld [0,0,0]) > 50) then { floor1_2 setPosATL _pos; floor1_2 setDir (getDir startLocation - 0); floor1_2 setCaptive true; }; _pos = startLocation modelToWorld [1.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor2_2 modelToWorld [0,0,0]) > 50) then { floor2_2 setPosATL _pos; floor2_2 setDir (getDir startLocation - 0); floor2_2 setCaptive true; }; _pos = startLocation modelToWorld [-1.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor3_1 modelToWorld [0,0,0]) > 50) then { floor3_2 setPosATL _pos; floor3_2 setDir (getDir startLocation - 0); floor3_2 setCaptive true; }; _pos = startLocation modelToWorld [3,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor4_2 modelToWorld [0,0,0]) > 50) then { floor4_2 setPosATL _pos; floor4_2 setDir (getDir startLocation - 0); floor4_2 setCaptive true; }; _pos = startLocation modelToWorld [-3,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor5_2 modelToWorld [0,0,0]) > 50) then { floor5_2 setPosATL _pos; floor5_2 setDir (getDir startLocation - 0); floor5_2 setCaptive true; }; _pos = startLocation modelToWorld [4.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor6_2 modelToWorld [0,0,0]) > 50) then { floor6_2 setPosATL _pos; floor6_2 setDir (getDir startLocation - 0); floor6_2 setCaptive true; }; _pos = startLocation modelToWorld [-4.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor7_2 modelToWorld [0,0,0]) > 50) then { floor7_2 setPosATL _pos; floor7_2 setDir (getDir startLocation - 0); floor7_2 setCaptive true; }; _pos = startLocation modelToWorld [6,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor8_2 modelToWorld [0,0,0]) > 50) then { floor8_2 setPosATL _pos; floor8_2 setDir (getDir startLocation - 0); floor8_2 setCaptive true; }; _pos = startLocation modelToWorld [-6,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor9_2 modelToWorld [0,0,0]) > 50) then { floor9_2 setPosATL _pos; floor9_2 setDir (getDir startLocation - 0); floor9_2 setCaptive true; }; _pos = startLocation modelToWorld [7.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor10_2 modelToWorld [0,0,0]) > 50) then { floor10_2 setPosATL _pos; floor10_2 setDir (getDir startLocation - 0); floor10_2 setCaptive true; }; _pos = startLocation modelToWorld [-7.5,10.5,0]; _pos set [2,3.3]; if (getMarkerPos "USFLAG" distance (floor11_2 modelToWorld [0,0,0]) > 50) then { floor11_2 setPosATL _pos; floor11_2 setDir (getDir startLocation - 0); floor11_2 setCaptive true; }; for "_i" from 0 to (count westVehicleStrings - 1) do { _str = westVehicleStrings select _i; // isNil _str check if the vehicle is undefined // note that, _str does NOT get wrapped in quotes because _str contains the vehicle name // and we are checking for the presence of the vehicle, I assume _str whill always be a valid string if (isNil _str) then { _i call resetWestVehicle; } else { _vcl = call compile _str; // _vcl should not be NIL here .... due to ( isNil _str) protecting us // but it could be anything, so ... check its an object if (typeName _vcl=="OBJECT") then { if ( isNull _vcl) then { _i call resetWestVehicle; } else { call checkVehiclesNearbyCampObjs; if (!alive _vcl) then { _i call resetWestVehicle; } else { scopeName "main"; _range = 500; if (typeOf _vcl == ATVTYPE) then { _range = 500; }; if (typeOf _vcl == HELITYPE && heliRC == 1) exitWith { breakTo "main"; }; _plrs = nearestPlayers(getPosATL _vcl,SPAWNRANGE,false,"array"); if (alive _vcl && !arrCanSee(_plrs,_vcl,45,_range) && _vcl distance startLocation > 100) then { _driver = driver _vcl; _gunner = gunner _vcl; if (!isNull _driver || !isNull _gunner) then { if (alive _driver || alive _gunner) exitWith { breakTo "main"; }; }; { moveOut _x; } forEach (crew _vcl); _i call resetWestVehicle; }; }; }; }; }; sleep 0.01; }; }; // returns one specific vehicle or re-creates it at the start position resetWestVehicle = { private ["_vcl","_str","_objs","_type","_bool","_pos","_dir","_id","_i","_vclKilledTime","_vclTimeDiff"]; _i = _this; _str = westVehicleStrings select _i; if (_i > 8 || _i == -1) exitWith { }; //only return listed vehicles, but not MHQ _id = _i % 4; _pos = baseflag modelToWorld [-8,-6+_id*3.5]; _dir = getDir baseflag - 90; _type = if (_id % 2 == 1) then { CAR1TYPE } else { CAR2TYPE }; if (_i >= 4) then { _id = _id + 1; _type = ATVTYPE; _pos = baseflag modelToWorld [-8,5+_id*3.5]; }; if (_i == 6) then { _type = HEAVY1TYPE; _pos = getPosATL armorpad; _dir = getDir armorpad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 7) then { _type = HELITYPE; _pos = getPosATL helipad; _dir = getDir helipad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 8) then { _type = HELI2TYPE; _pos = getPosATL helipad2; _dir = getDir helipad2; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; _pos set [2,0]; _bool = isNil _str; _vcl = call compile _str; if !_bool then { _bool = isNull _vcl || !alive _vcl; }; if _bool then { // calculate if vehicle respawn time has elapsed _vclKilledTime = missionNameSpace getVariable format["%1_killedTime",_str]; if (isNil "_vclKilledTime") then { _vclKilledTime = 0; }; _vclTimeDiff = (time - _vclKilledTime); if (_vclTimeDiff <= westVehicleRespawn && _vclKilledTime != 0) exitWith { /* respawn delay has not elapsed */ }; _objs = nearestObjects[_pos,["LandVehicle","Air","CraterLong"],20]; if (count _objs > 0) then { { if (!(_x isKindOf "AllVehicles") || !alive _x) then { deleteVehicle _x; }; } forEach _objs; }; _vcl = createVehicle [_type, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", _str]; _vcl setDir _dir; _vcl setPosATL _pos; if (_i < 4 || _i == 7) then { _vcl call setVclAmmoCargo; }; processInitCommands; [player,_vcl,"loc",rSPAWN,_vcl,{ _this call addActionLock; }] call RE; // attach killed EH to define time when vehicle was killed, in order to check for respawn delay _vcl addEventHandler ["killed", { missionNamespace setVariable [format["%1_killedTime",(_this select 0)], time]; }]; } else { _vcl call vehicleService; _vcl engineOn false; _vcl setDir _dir; _vcl setPosATL _pos; }; }; setWeaponCargo = { private ["_vcl","_wep","_num","_cargo","_arr1","_arr2","_count","_id"]; _vcl = _this select 0; _wep = _this select 1; _num = 0; _cargo = getWeaponCargo _vcl; _arr1 = _cargo select 0; _id = _arr1 find _wep; if (_id == -1) exitWith {}; _arr1 set[_id, str _wep]; _arr2 = (_cargo select 1); _arr2 set[_id, 0]; _cargo = [_arr1,_arr2]; _count = count _arr2; call compile format[' _vcl setVehicleInit " clearWeaponCargo this; for ""_i"" from 0 to (%2 - 1) do { _wep = (%1 select 0) select _i; _num = (%1 select 1) select _i; this addWeaponCargo [_wep,_num]; }; "; processInitCommands; ', _cargo, _count]; }; vehicleService = { _this call setVclAmmoCargo; processInitCommands; }; setVclAmmoCargo = { _this setVehicleInit ' this setVehicleAmmo 1; this setFuel 1; this setDamage 0; clearWeaponCargo this; clearMagazineCargo this; { this addMagazineCargo [_x select 0, _x select 1]; } forEach humvMagazines; if (player in crew this) then { titleText["Vehicle serviced", "PLAIN DOWN"]; }; '; }; addActionLock = { private "_actionIndex"; _actionIndex = _this addAction ["Lock","common\client\actions\noScript.sqf",' _this select 0 lock true; _this select 0 removeAction (_this select 2); _this select 0 call addActionUnlock; ',1,false,true,"","isAdmin"]; }; addActionUnlock = { private "_actionIndex"; _actionIndex = _this addAction ["Unlock","common\client\actions\noScript.sqf",' _this select 0 lock false; _this select 0 removeAction (_this select 2); _this select 0 call addActionLock; ',1,false,true,"","isAdmin"]; }; checkVehiclesNearbyCampObjs = { _isemptycar = _vcl!=heli && !(player in _vcl); _campObjArray = ["M1130_HQ_unfolded_Base_EP1","MASH_EP1","US_WarfareBVehicleServicePoint_EP1","Land_fortified_nest_small_EP1"]; _isemptyheli = _vcl==heli && !(player in _vcl); /* if (_isemptycar && _vcl distance (fieldHospital modelToWorld [0,0,0]) < 2) then { _vcl setPos [(getPos _vcl select 0) + 3, (getPos _vcl select 1) + 3, (getPos _vcl select 2)]}; if (_isemptycar && _vcl distance (vehicleServicePoint modelToWorld [0,0,0]) < 1) then { _vcl setPos [(getPos _vcl select 0) + 2, (getPos _vcl select 1) + 2, (getPos _vcl select 2)]}; if (_isemptycar && _vcl distance (helipad modelToWorld [0,0,0]) < 7) then { _vcl setPos [(getPos helipad select 0) - 10, (getPos helipad select 1) + 1, (getPos helipad select 2)]}; if (_isemptycar && _vcl distance (helipad2 modelToWorld [0,0,0]) < 0) then { _vcl setPos [(getPos helipad2 select 0) + 0, (getPos helipad2 select 1) + 0, (getPos helipad2 select 2)]}; if (_isemptycar && _vcl distance (armorpad modelToWorld [0,0,0]) < 0) then { _vcl setPos [(getPos armorpad select 0) + 0, (getPos armorpad select 1) + 0, (getPos armorpad select 2)]}; if (_isemptycar && _vcl distance (HQ modelToWorld [0,0,0]) < 6) then { _vcl setPos [(getPos _vcl select 0) + 0.5, (getPos _vcl select 1) - 6, (getPos _vcl select 2)]}; */ if (HQ distance (helipad modelToWorld [0,0,0]) < 10) then { HQ setDir (getDir vehicleServicePoint + 90); _pos = vehicleServicePoint modelToWorld [10,0,0]; _pos set [2,0]; HQ setPosATL _pos; }; }; the floor entries are at a height of 3.3 and are over the position of "HELIPAD" and its helicopter that spawns on it ,HELITYPE! now I've tried setting the height of the helipad: (here:) _pos = startLocation modelToWorld [-1,12,0]; _pos set [2,[color="Red"]3.5[/color]]; if (getMarkerPos "USFLAG" distance (helipad modelToWorld [0,0,0]) > 50) then { helipad setPosATL _pos; helipad setDir (getDir startLocation - 90); }; where the helitype spawns to! and I tried setting the helitype height (here:) if (_i == 7) then { _type = HELITYPE; _pos = getPosATL helipad; _dir = getDir helipad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos -
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i tried a shit load of combinations! this code is from insurgency. this won't work! because the vehicle you entered is chosen by a parameter!! you can have 10 different helicopters! i just need something piece of code that works with this script -
no problem! i already improved the code and added parameters for ACE and ACRE! should be fully functional so we are golden ati!
-
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
this part sets the location:helipad2, its direction(same as helipad) but now i need to add a extra line that spawns a helicopter 4 meter above ground where i made the helipad with pallets and containers! -
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
sweet thx ---------- Post added at 11:42 PM ---------- Previous post was at 11:40 PM ---------- do you guys have any idea how i can spawn this heli at a +3 height?? this is the part that spawns a helicopter to the helipad if (_i == 8) then { _type = HELI2TYPE; _pos = getPosATL helipad2; _dir = getDir helipad2; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos What ever i try it always spawns on the ground..... -
Are suicide bombers etc working? never met one! only 1/2 ied's!
-
modelToWorld behavior change since 1.60
BelgarionNL replied to hcpookie's topic in ARMA 2 & OA - TROUBLESHOOTING
yea not working! dwarden plz make sure that it gets fixed! i need it for a mission :) -
this is a piece of code that spawns part of a mobile base: _pos = startLocation modelToWorld [13,-9,0]; _pos set [2,5]; if (getMarkerPos "USFLAG" distance (vehicleServicePoint modelToWorld [0,0,0]) > 50) then { vehicleServicePoint setPosATL _pos; vehicleServicePoint setDir (getDir startLocation - 180); vehicleServicePoint setCaptive true; _pos set [2,5]; is now set at height 5 so it works! the reason for this is that i want to create a semi-mobile FOB! and I need all the objects at the same height for that!
-
its not having problems! just that they are complete eggheads! and can barely operate there pc :D then you program is very hard to get used too :D
-
MRAP - RG31 Mk5
BelgarionNL replied to ExplosiveAids's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
i want it NOW :D superb -
that is true for some! i find that nothing is easier then six but my clan still only uses six updater to update and download the mods and then uses arma2 launcher to launch the game .................................. thats my program i face! i spend hours and hours using teamviewer to help set up six updater! but those 2 links for server admins i am definately going to read and set up!
-
MP compatible: Illuminate Helipads for incoming heli's, HOW???
BelgarionNL replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yea i had to be without AI since the base needs to able to move! (insurgency) -
can this be modified so it gives you a maximum of 2 AI units even though there are 5 players already in the squad?
-
i know there are enough mods! but the thing is! people are having a hard time as it is getting ace to run properly! if they also need to get other islands/mods it almost gets impossible for the 30+ age group! and regarding this bug: I AM running it vanilla + ace and I just place that mh6j DAGR/FLIR in the editor and launch it! RPT: Error in expression <lect 0 } else { _this }; _pos = (_this) select 1; _unit = (_this) select 2; ; if> Error position: <select 1; _unit = (_this) select 2; ; if> Error Zero divisor File x\ace\addons\sys_air_fcs\fnc_loop.sqf, line 4 [6569,81.159,0,"XEH: PostInit Started"] [6569,81.208,0,"CBA_VERSIONING: cba=0.8.3.175, ace=1.13.0.522, acex=1.13.0.353, acex_ru=1.13.0.64, acex_usnavy=1.13.0.67, "] [6569,81.265,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=2, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=B 1-1-A:1 (Belgarion), _playerType="US_Soldier_Pilot_EP1", _playerGroup=B 1-1-A, _playerVehicle=B 1-1-A:1 (Belgarion), _playerVehicleType="ACE_AH6J_DAGR_FLIR""]
-
the AH6J DAGR/FLIR gives an script error when I launch the game!!!! so recreate it yourself and F I X it XD love the mod gents! why are there not more vehicles in ace that are created by other modders? F16 comes to mind among countless others!
-
you can search for insurgency! go to the multiplayer lobby then select FILTER! and type insurgency where is says mission, if you do that you will get all the insurgency gameserver that are running it!
-
where? :P i did update the code couple of times! it all spawns except for my one heavy vehicle! IT WORKS! WOOT XD
-
because my clan asked for it :P but sometimes random people take the chopper and stay close to it so it won't respawn! also its great to have a mh60 and mh6 for squad operations. plz help me sir :) i think its almost working i just forgot something small i reckon edit: i see that the warping is a Feature so you can always land on the helipad! NICE! 1 more things remains: What do i need to change to get 2x car1, 2x car2, 2x ATV, 1x heavy vehicle, 1x heli1, 1xheli2??? THIS but what: // returns one specific vehicle or re-creates it at the start position resetWestVehicle = { private ["_vcl","_str","_objs","_type","_bool","_pos","_dir","_id","_i","_vclKilledTime","_vclTimeDiff"]; _i = _this; _str = westVehicleStrings select _i; if (_i > 9 || _i == -1) exitWith { }; //only return listed vehicles, but not MHQ _id = _i % 4; _pos = baseflag modelToWorld [-9,-8+_id*3,0]; _dir = getDir baseflag - 90; _type = if (_id % 2 == 1) then { CAR1TYPE } else { CAR2TYPE }; if (_i >= 4) then { _id = _id + 1; _type = ATVTYPE; _pos = baseflag modelToWorld [-9,5+_id*3,0]; }; if (_i == 6) then { _type = HEAVYTYPE; _pos = getPosATL armorpad; _dir = getDir armorpad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 7) then { _type = HELITYPE; _pos = getPosATL helipad; _dir = getDir helipad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 8) then { _type = HELI2TYPE; _pos = getPosATL helipad2; _dir = getDir helipad2; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos };
-
I modified the 0.80 version for my clan which contained an extra clan vehicle and chopper! I want to remove 3 ATV's and 2 HUMVEE's what do i alter here: //ÐœÐ¾Ñ Ð“Ð¾Ð»Ð³Ð¾Ñ„Ð°... westVehicleChecker = { private ["_vcl","_pos","_range","_driver","_plrs","_str"]; if (!alive MHQ && startLocation == MHQ) exitWith { _vcl = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", "MHQ"]; processInitCommands; HQ setDir (getDir vehicleServicePoint + 90); _pos = vehicleServicePoint modelToWorld [10,0,0]; _pos set [2,0]; HQ setPosATL _pos; }; if (startLocation != HQ) exitWith {}; _pos = startLocation modelToWorld [0,12,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (helipad modelToWorld [0,0,0]) > 50) then { helipad setPosATL _pos; helipad setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [0,-15,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (helipad2 modelToWorld [0,0,0]) > 50) then { helipad2 setPosATL _pos; helipad2 setDir (getDir startLocation - 90); }; _pos = bunker modelToWorld [5.5,4,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (armorpad modelToWorld [0,0,0]) > 50) then { armorpad setPosATL _pos; armorpad setDir (getDir startLocation - 0); }; _pos = startLocation modelToWorld [4.3,-6,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (vehicleServicePoint modelToWorld [0,0,0]) > 50) then { vehicleServicePoint setPosATL _pos; vehicleServicePoint setDir (getDir startLocation - 180); vehicleServicePoint setCaptive true; }; _pos = startLocation modelToWorld [1.25,-0.3,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (bunker modelToWorld [0,0,0]) > 50) then { bunker setPosATL _pos; bunker setDir (getDir startLocation - 0); bunker setCaptive true; }; _pos = vehicleServicePoint modelToWorld [-8,0,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (repairarea modelToWorld [0,0,0]) > 50) then { repairarea setPosATL _pos; repairarea setDir (getDir vehicleServicePoint); }; _pos = startLocation modelToWorld [-2,-8,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (baseflag modelToWorld [0,0,0]) > 50) then { baseflag setPosATL _pos; baseflag setDir (getDir startLocation); }; _pos = startLocation modelToWorld [0,-7.5,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (HQ modelToWorld [0,0,0]) > 50) then { fieldHospital setPosATL _pos; fieldHospital setDir (getDir startLocation - 90); fieldHospital setCaptive true; }; for "_i" from 0 to (count westVehicleStrings - 1) do { _str = westVehicleStrings select _i; // isNil _str check if the vehicle is undefined // note that, _str does NOT get wrapped in quotes because _str contains the vehicle name // and we are checking for the presence of the vehicle, I assume _str whill always be a valid string if (isNil _str) then { _i call resetWestVehicle; } else { _vcl = call compile _str; // _vcl should not be NIL here .... due to ( isNil _str) protecting us // but it could be anything, so ... check its an object if (typeName _vcl=="OBJECT") then { if ( isNull _vcl) then { _i call resetWestVehicle; } else { call checkVehiclesNearbyCampObjs; if (!alive _vcl) then { _i call resetWestVehicle; } else { scopeName "main"; _range = 400; if (typeOf _vcl == ATVTYPE) then { _range = 100; }; if (typeOf _vcl == HELITYPE && heliRC == 1) exitWith { breakTo "main"; }; _plrs = nearestPlayers(getPosATL _vcl,SPAWNRANGE,false,"array"); if (alive _vcl && !arrCanSee(_plrs,_vcl,45,_range) && _vcl distance startLocation > 100) then { _driver = driver _vcl; _gunner = gunner _vcl; if (!isNull _driver || !isNull _gunner) then { if (alive _driver || alive _gunner) exitWith { breakTo "main"; }; }; { moveOut _x; } forEach (crew _vcl); _i call resetWestVehicle; }; }; }; }; }; sleep 0.01; }; }; // returns one specific vehicle or re-creates it at the start position resetWestVehicle = { private ["_vcl","_str","_objs","_type","_bool","_pos","_dir","_id","_i","_vclKilledTime","_vclTimeDiff"]; _i = _this; _str = westVehicleStrings select _i; if (_i > 9 || _i == -1) exitWith { }; //only return listed vehicles, but not MHQ _id = _i % 4; _pos = baseflag modelToWorld [-9,-8+_id*3,0]; _dir = getDir baseflag - 90; _type = if (_id % 2 == 1) then { CAR1TYPE } else { CAR2TYPE }; if (_i >= 4) then { _id = _id + 1; _type = ATVTYPE; _pos = baseflag modelToWorld [-9,5+_id*3,0]; }; if (_i == 6) then { _type = HEAVYTYPE; _pos = getPosATL armorpad; _dir = getDir armorpad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 7) then { _type = HELITYPE; _pos = getPosATL helipad; _dir = getDir helipad; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; if (_i == 8) then { _type = HELI2TYPE; _pos = getPosATL helipad2; _dir = getDir helipad2; if (_pos distance startLocation > 100) exitWith {}; //avoid racing condition, where helipad is still at spawnPos }; _pos set [2,0]; _bool = isNil _str; _vcl = call compile _str; if !_bool then { _bool = isNull _vcl || !alive _vcl; }; if _bool then { // calculate if vehicle respawn time has elapsed _vclKilledTime = missionNameSpace getVariable format["%1_killedTime",_str]; if (isNil "_vclKilledTime") then { _vclKilledTime = 0; }; _vclTimeDiff = (time - _vclKilledTime); if (_vclTimeDiff <= westVehicleRespawn && _vclKilledTime != 0) exitWith { /* respawn delay has not elapsed */ }; _objs = nearestObjects[_pos,["LandVehicle","Air","CraterLong"],20]; if (count _objs > 0) then { { if (!(_x isKindOf "AllVehicles") || !alive _x) then { deleteVehicle _x; }; } forEach _objs; }; _vcl = createVehicle [_type, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", _str]; _vcl setDir _dir; _vcl setPosATL _pos; if (_i < 6 || _i == 11) then { _vcl call setVclAmmoCargo; }; processInitCommands; [player,_vcl,"loc",rSPAWN,_vcl,{ _this call addActionLock; }] call RE; // attach killed EH to define time when vehicle was killed, in order to check for respawn delay _vcl addEventHandler ["killed", { missionNamespace setVariable [format["%1_killedTime",(_this select 0)], time]; }]; } else { _vcl call vehicleService; _vcl engineOn false; _vcl setDir _dir; _vcl setPosATL _pos; }; }; setWeaponCargo = { private ["_vcl","_wep","_num","_cargo","_arr1","_arr2","_count","_id"]; _vcl = _this select 0; _wep = _this select 1; _num = 0; _cargo = getWeaponCargo _vcl; _arr1 = _cargo select 0; _id = _arr1 find _wep; if (_id == -1) exitWith {}; _arr1 set[_id, str _wep]; _arr2 = (_cargo select 1); _arr2 set[_id, 0]; _cargo = [_arr1,_arr2]; _count = count _arr2; call compile format[' _vcl setVehicleInit " clearWeaponCargo this; for ""_i"" from 0 to (%2 - 1) do { _wep = (%1 select 0) select _i; _num = (%1 select 1) select _i; this addWeaponCargo [_wep,_num]; }; "; processInitCommands; ', _cargo, _count]; }; vehicleService = { _this call setVclAmmoCargo; processInitCommands; }; setVclAmmoCargo = { _this setVehicleInit ' this setVehicleAmmo 1; this setFuel 1; this setDamage 0; clearWeaponCargo this; clearMagazineCargo this; { this addMagazineCargo [_x select 0, _x select 1]; } forEach humvMagazines; if (player in crew this) then { titleText["Vehicle serviced", "PLAIN DOWN"]; }; '; }; addActionLock = { private "_actionIndex"; _actionIndex = _this addAction ["Lock","common\client\actions\noScript.sqf",' _this select 0 lock true; _this select 0 removeAction (_this select 2); _this select 0 call addActionUnlock; ',1,false,true,"","isAdmin"]; }; addActionUnlock = { private "_actionIndex"; _actionIndex = _this addAction ["Unlock","common\client\actions\noScript.sqf",' _this select 0 lock false; _this select 0 removeAction (_this select 2); _this select 0 call addActionLock; ',1,false,true,"","isAdmin"]; }; //checkVehiclesNearbyCampObjs = { // _isemptycar = _vcl!=heli && !(player in _vcl); // _campObjArray = ["M1130_HQ_unfolded_Base_EP1","MASH_EP1","US_WarfareBVehicleServicePoint_EP1","Land_fortified_nest_small_EP1","Land_Fort_Watchtower_EP1"]; // _isemptyheli = _vcl==heli && !(player in _vcl); // // if (_isemptycar && _vcl distance (fieldHospital modelToWorld [0,0,0]) < 2) then { // _vcl setPos [(getPos _vcl select 0) + 3, // (getPos _vcl select 1) + 3, // (getPos _vcl select 2)]}; // // if (_isemptycar && _vcl distance (vehicleServicePoint modelToWorld [0,0,0]) < 1) then { // _vcl setPos [(getPos _vcl select 0) + 2, // (getPos _vcl select 1) + 2, /// (getPos _vcl select 2)]}; // // if (_isemptycar && _vcl distance (helipad modelToWorld [0,0,0]) < 7) then { // _vcl setPos [(getPos helipad select 0) - 10, // (getPos helipad select 1) + 1, // (getPos helipad select 2)]}; // // if (_isemptycar && _vcl distance (helipad2 modelToWorld [0,0,0]) < 0) then { // _vcl setPos [(getPos helipad2 select 0) + 0, // (getPos helipad2 select 1) + 0, // (getPos helipad2 select 2)]}; // // if (_isemptycar && _vcl distance (armorpad modelToWorld [0,0,0]) < 0) then { // _vcl setPos [(getPos armorpad select 0) + 0, // (getPos armorpad select 1) + 0, // (getPos armorpad select 2)]}; // // if (_isemptycar && _vcl distance (HQ modelToWorld [0,0,0]) < 6) then { // _vcl setPos [(getPos _vcl select 0) + 0.5, // (getPos _vcl select 1) - 6, // (getPos _vcl select 2)]}; // // if (HQ distance (helipad modelToWorld [0,0,0]) < 10) then { // HQ setDir (getDir vehicleServicePoint + 90); // _pos = vehicleServicePoint modelToWorld [10,0,0]; // _pos set [2,0]; // HQ setPosATL _pos; // }; //}; also for some reason once my second heli lands close or on top of the Helipad1 it warps! some meters away to a fixed point! same for the heavy vehicle! HELP plz :D so: 2x car1 2x car2 2x atv 1x HeavyCar 1x Heli1 1x Heli2 as always loving the way you guys seem to make every new version just a bit then then the previous! AWESOME
-
i was playing insurgency ace latest version but i have no option to examine HELP
-
how does the medical system work? the documentation is absolutely useless! am I missing some guides or did you guys just skip it! and let people figure it out for themselves? :D
-
ARMA 2: OA 1.60, ARMA 2 1.11, ARMA 2: Free 1.11, ARMA 2: BAF 1.03, ARMA 2: PMC 1.02
BelgarionNL replied to Dwarden's topic in ARMA 2 & OA - GENERAL
he reinstalled operation arrowhead and verified arma 2 steam cache! still red X in front of mission saying that he does not have 1.60 when he just installed the 710 mb patch! -
ARMA 2: OA 1.60, ARMA 2 1.11, ARMA 2: Free 1.11, ARMA 2: BAF 1.03, ARMA 2: PMC 1.02
BelgarionNL replied to Dwarden's topic in ARMA 2 & OA - GENERAL
problem with a friend's copy! he got the steam arma 2 version and Operation arrowhead as a retail copy and now he is trying to update OA and it says! game not installed or might be corrupted! he can play 1.59 just fine! W T F ps smooth patch it runs great on my 570