|
|
Модератор форума: Slon |
Форум РЕДАКТОР - ArmA 2 Operation Arrowhead Скрипты Chernarus edit |
Chernarus edit |
› Понедельник
› 27.04.2015
› 14:31
› Сообщение #
Скрипт замены домов в Черноруссии на входибельные.
Выбирал не входибельные домики и подставил примерно такие же по размеру. Факт, но никаких потерь в фпс нет ни на клиенте, ни на сервере. Примерно получается 1600 объектов. Есть конечно всякие мелкие недостатки в расстановке, но это мелочь в сравнение с тем что Чернарусь теперь играбельна вдвойне! Скрипт уже используется в FFA EVO ACE. Учел пожелания любителей визуальной гармонии - подобрал здания более подходящие под атмосферу острова . Плюс перебрал все заменяемые здания по размерам, как становятся, нет ли каких то дефектов. Код FFA_CLOSEHOUSE=["Land_HouseV_1I1","Land_HouseV_1I2","Land_HouseV_2L","Land_HouseV_3I3","Land_HouseV_3I1","Land_HouseV_3I4","Land_HouseV_3I2","Land_HouseV_1L 1", "Land_houseV_2T1","Land_houseV_2T2","Land_HouseV_1T","Land_HouseV_2I","Land_Hous eV_1I4","Land_HouseV_1I3","Land_HouseV_1L2","Land_HouseV2_03B","Land_HouseV2_03" , "Land_HouseV2_01A","Land_HouseV2_01B","Land_HouseV2_02_Interier","Land_HouseV2_0 4_interier","Land_HouseV2_05","Land_SS_hangar","Land_A_Office02","Land_A_Hospita l"]; if (isServer) then { _box1=[["Land_HouseV_1I1","Land_HouseV_1I2"],["Land_smd_budova3_open"]]; _box2=[["Land_HouseV_3I3","Land_HouseV_3I1","Land_HouseV_3I4","Land_HouseV_3I2","Land_HouseV_1L1"],["Land_cihlovej_dum_in","Land_bouda2_vnitrek" ,"Land_hruzdum","Land_smd_cihlovej_dum_mini"]]; _box3=[["Land_houseV_2T1","Land_houseV_2T2"],["land_mbg_brickhouse_01","land_mbg_brickhouse_03","Land_sara_domek_zluty"]]; _box4=[["Land_HouseV_1T"],["Land_smd_hospoda_mesto"]]; _box5=[["Land_HouseV_2I","Land_HouseV_1I4","Land_HouseV_1I3","Land_HouseV_1I4","Land_HouseV_2L","Land_HouseV_1L2"],["Land_dum_mesto2"]]; _box6=[["Land_HouseV2_03B","Land_HouseV2_01A","Land_HouseV2_01B"],["Land_dum_mesto_in","Land_MBG_GER_PUB_2","Land_MBG_GER_PUB_1"]]; _box7=[["Land_HouseV2_03"],["Land_MBG_ATC_Base"]]; _box8=[["Land_HouseV2_02_Interier","Land_HouseV2_04_interier","Land_HouseV2_05"],["Land_MBG_GER_HUS_1","Land_MBG_GER_HUS_2","Land_MBG_GER_HUS_3","Land_MBG_GER_HUS_4"]]; _box9=[["Land_A_Hospital","Land_A_Office02"],["Land_mbg_companybuilding_1"]]; _box10=[["Land_SS_hangar"],["Land_smd_ss_hangar_withdoor"]]; _FFA_LHOUSEV=[]; _FFA_HOUSES=[]; if (worldName == "chernarus") then { _FFA_LHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000]; for "_i" from 0 to (count _FFA_LHOUSEV)-1 do { _housev=_FFA_LHOUSEV select _i; if ((typeof _housev) in FFA_CLOSEHOUSE) then { _FFA_HOUSES set [count _FFA_HOUSES,_housev]; }; }; for "_i" from 0 to (count _FFA_HOUSES)-1 do { _nBuilding =_FFA_HOUSES select _i; _dirVector = vectorDir _nBuilding; _objVector = vectorUp _nBuilding; _pos = ASLtoATL getPosASL _nBuilding; _nBuilding hideObject true; _type=""; call{ if ((typeof _nBuilding) in (_box1 select 0)) exitwith {_type=(_box1 select 1) select (floor random (count (_box1 select 1)));}; if ((typeof _nBuilding) in (_box2 select 0)) exitwith {_type=(_box2 select 1) select (floor random (count (_box2 select 1)));}; if ((typeof _nBuilding) in (_box3 select 0)) exitwith {_type=(_box3 select 1) select (floor random (count (_box3 select 1)));}; if ((typeof _nBuilding) in (_box4 select 0)) exitwith {_type=(_box4 select 1) select (floor random (count (_box4 select 1)));}; if ((typeof _nBuilding) in (_box5 select 0)) exitwith {_type=(_box5 select 1) select (floor random (count (_box5 select 1)));}; if ((typeof _nBuilding) in (_box6 select 0)) exitwith {_type=(_box6 select 1) select (floor random (count (_box6 select 1)));}; if ((typeof _nBuilding) in (_box7 select 0)) exitwith {_type=(_box7 select 1) select (floor random (count (_box7 select 1)));}; if ((typeof _nBuilding) in (_box8 select 0)) exitwith {_type=(_box8 select 1) select (floor random (count (_box8 select 1)));}; if ((typeof _nBuilding) in (_box9 select 0)) exitwith {_type=(_box9 select 1) select (floor random (count (_box9 select 1)));}; if ((typeof _nBuilding) in (_box10 select 0)) exitwith {_type=(_box10 select 1) select (floor random (count (_box10 select 1)));}; }; _house = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"]; _house setVectorDirAndUp [ _dirVector, _objVector]; if ((typeof _house) in (_box9 select 1)) then {_house setdir ((getdir _nBuilding)+90);}; }; }; }; if(!isServer || local player)then { waitUntil{(player==player)}; waitUntil{alive player}; waitUntil{local player}; if (worldName == "chernarus") then { _FFA_CHOUSEV=[]; _FFA_CHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000]; for "_i" from 0 to (count _FFA_CHOUSEV)-1 do { _housev=_FFA_CHOUSEV select _i; if ((typeof _housev) in FFA_CLOSEHOUSE) then { _housev hideObject true; }; }; }; }; ну и скрипт попроще для СО - замена домов на такистанские. Код KK_fnc_inString = { /* Author: Killzone_Kid Description: Find a string within a string (case insensitive) Parameter(s): _this select 0: <string> string to be found _this select 1: <string> string to search in Returns: Boolean (true when string is found) How to use: _found = ["needle", "Needle in Haystack"] call KK_fnc_inString; */ private ["_needle","_haystack","_needleLen","_hay","_found"]; _needle = _this select 0; _haystack = toArray (_this select 1); _needleLen = count toArray _needle; _hay = +_haystack; _hay resize _needleLen; _found = false; for "_i" from _needleLen to count _haystack do { if (toString _hay == _needle) exitWith {_found = true}; _hay set [_needleLen, _haystack select _i]; _hay set [0, "x"]; _hay = _hay - ["x"] }; _found }; if (isServer) then { FFA_LHOUSEV=[]; FFA_HOUSES=[]; FFA_OPENHOUSE = [/*"MAP_dum_mesto2","MAP_sara_stodola","MAP_stodola_old_open","mbg_brickhouse_01_EO","mbg_brickhouse_02_EO","mbg_brickhouse_03_EO","Land_MBG_G ER_RHUS_1","Land_MBG_GER_RHUS_3","Land_MBG_GER_RHUS_4","Land_MBG_GER_RHUS_5", "Land_10str","Land_15str","Land_hut3_b","Land_hut5","Land_hut7","Land_hut9","Land_hut9_b","Land_hut9_c","Land_hut10","Land_hut12","Land_mina ret3","Land_cihlovej_dum_in","Land_deutshe_mini","Land_sara_hasic_zbroj", "Land_bouda2_vnitrek","Land_hruzdum","Land_dum_rasovna","Land_sara_Domek_sedy","Land_sara_domek_zluty","Land_smd_budova3_open","Land_smd_cih lovej_dum_mini","Land_smd_dum_olezlina_open","Land_dum_mesto2", "Land_smd_hospoda_mesto","Land_smd_house_y_open","Land_smd_sara_zluty_statek_in","Land_smd_dum_olez_istan2_maly_open","Land_smd_dum_olez_ist an2_open","Land_smd_dum_olez_istan2_open2","Land_smd_dum_olez_istan1_open", "Land_mbg_observation_tower",*/ "Land_House_C_5_EP1","Land_House_C_5_V1_EP1","Land_House_C_5_V2_EP1","Land_House_C_5_V3_EP1","Land_House_C_12_EP1","Land_House_K_1_EP1","Lan d_House_K_3_EP1","Land_House_K_5_EP1","Land_House_L_8_EP1", "Land_House_K_6_EP1","Land_House_K_7_EP1","Land_House_K_8_EP1","Land_House_L_1_EP1","Land_House_L_4_EP1","Land_House_L_6_EP1","Land_House_L_ 7_EP1","Land_House_L_8_EP1"]; if (worldName == "chernarus") then { FFA_LHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000]; for "_i" from 0 to (count FFA_LHOUSEV)-1 do { _housev=FFA_LHOUSEV select _i; if ((["Land_HouseV_",str (typeof _housev)] call KK_fnc_inString) || {(["Land_HouseV2_",str (typeof _housev)] call KK_fnc_inString)}) then { FFA_HOUSES set [count FFA_HOUSES,_housev]; }; }; for "_i" from 0 to (count FFA_HOUSES)-1 do { _nBuilding =FFA_HOUSES select _i; _dirVector = vectorDir _nBuilding; _objVector = vectorUp _nBuilding; _pos = getposatl _nBuilding; _nBuilding hideObject true; _type= FFA_OPENHOUSE select (floor random (count FFA_OPENHOUSE)); _house = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"]; _house setVectorDirAndUp [ _dirVector, _objVector]; }; }; FFA_LHOUSEV resize 0; FFA_HOUSES resize 0; }; if(!isServer || local player)then { waitUntil{(player==player)}; waitUntil{alive player}; waitUntil{local player}; if (worldName == "chernarus") then { FFA_CHOUSEV=[]; FFA_CHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000]; for "_i" from 0 to (count FFA_CHOUSEV)-1 do { _housev=FFA_CHOUSEV select _i; if ((["Land_HouseV_",str (typeof _housev)] call KK_fnc_inString) || {(["Land_HouseV2_",str (typeof _housev)] call KK_fnc_inString)}) then { _housev hideObject true; }; }; FFA_CHOUSEV resize 0; }; }; Добавлено (02.04.2015, 14:41) Добавлено (02.04.2015, 14:59) Добавлено (03.04.2015, 13:19) Добавлено (22.04.2015, 10:56) Добавлено (27.04.2015, 14:31) |
› Понедельник
› 27.04.2015
› 15:17
› Сообщение #
Слушайа было бы прикольно сделать такое для 3 армы
SRL - https://vk.com/studio_russian_lynx
|
› Понедельник
› 27.04.2015
› 23:58
› Сообщение #
|
› Четверг
› 27.08.2015
› 23:09
› Сообщение #
Но джентльмены!
[ADX TEAM] Cherno+ (честно скомуниздил с другого форума :з ) https://yadi.sk/d/-CSYldB9fdzZa Добавлено (27.08.2015, 23:09)
Главное не война! Главное маневры!
|
| |||
| |||
Чат сайта |