Avtion
New Member
How Custom new Building spawn Loot?
English is not very good
Code:_config = configFile >> "CfgBuildingLoot" >> _type; _positions = [] + getArray (_config >> "lootPos"); //_itemTypes = [] + getArray (_config >> "itemType"); // Default System _lootChance = getNumber (_config >> "lootChance"); //------------------// //CUSTOM LOOT SPAWNS// //------------------// _itemTypes = []; //Initialise array _itemChance = []; //Initialise array switch (_type) do { //Assign building classes case "Land_HouseV_1I4": { _LootClass = "Residential"; }; case "Land_kulna": { _LootClass = "Residential"; }; case "Land_Ind_Workshop01_04": { _LootClass = "Industrial"; }; case "Land_hut06": { _LootClass = "Residential"; }; case "Land_Hlidac_budka": { _LootClass = "Residential"; }; case "Land_HouseV2_02_Interier": { _LootClass = "Residential"; }; case "Land_A_Pub_01": { _LootClass = "Residential"; }; case "Land_Shed_wooden": { _LootClass = "Residential"; }; case "Land_HouseBlock_A1_1": { _LootClass = "Residential"; }; case "Land_A_MunicipalOffice": { _LootClass = "Residential"; }; case "Land_ruin_01": { _LootClass = "Residential"; }; case "Land_HouseV2_04_interier": { _LootClass = "Residential"; }; case "Land_HouseV2_01A": { _LootClass = "Residential"; }; case "Land_psi_bouda": { _LootClass = "Residential"; }; case "Land_KBud": { _LootClass = "Residential"; }; case "Land_A_Castle_Bergfrit": { _LootClass = "Residential"; }; case "Land_A_Castle_Stairs_A": { _LootClass = "Residential"; }; case "Land_A_Castle_Gate": { _LootClass = "Residential"; }; case "Land_sara_domek_zluty": { _LootClass = "Residential"; }; case "Land_Church_01": { _LootClass = "Residential"; }; case "Land_Church_03": { _LootClass = "Residential"; }; case "Land_HouseB_Tenement": { _LootClass = "Residential"; }; case "Land_Panelak": { _LootClass = "Residential"; }; case "Land_Panelak2": { _LootClass = "Residential"; }; case "Land_rail_station_big": { _LootClass = "Residential"; }; case "Land_A_Office01": { _LootClass = "Residential"; }; case "Land_A_Office02": { _LootClass = "Residential"; }; case "Land_Ind_Workshop01_01": { _LootClass = "Industrial"; }; case "Land_Ind_Garage01": { _LootClass = "Industrial"; }; case "Land_Ind_Workshop01_02": { _LootClass = "Industrial"; }; case "Land_Ind_Workshop01_L": { _LootClass = "Industrial"; }; case "Land_Hangar_2": { _LootClass = "Industrial"; }; case "Land_A_FuelStation_Build": { _LootClass = "Industrial"; }; case "Land_Shed_Ind02": { _LootClass = "Industrial"; }; case "Land_Misc_PowerStation": { _LootClass = "Industrial"; }; case "Land_Shed_W01": { _LootClass = "Industrial"; }; case "Land_Tovarna2": { _LootClass = "Industrial"; }; case "Land_Ind_Vysypka": { _LootClass = "Industrial"; }; case "Land_A_BuildingWIP": { _LootClass = "Industrial"; }; case "Land_A_TVTower_Base": { _LootClass = "Industrial"; }; case "Land_Misc_Cargo1Ao": { _LootClass = "Industrial"; }; case "Land_Misc_Cargo1Bo": { _LootClass = "Industrial"; }; case "Land_Nav_Boathouse": { _LootClass = "Industrial"; }; case "Land_wagon_box": { _LootClass = "Industrial"; }; case "Land_Rail_House_01": { _LootClass = "Industrial"; }; case "Land_A_GeneralStore_01a": { _LootClass = "Supermarket"; }; case "Land_A_GeneralStore_01": { _LootClass = "Supermarket"; }; case "Land_A_Hospital": { _LootClass = "Hospital"; }; case "MASH": { _LootClass = "Hospital"; }; case "MASH_EP1": { _LootClass = "Hospital"; }; case "USMC_WarfareBFieldhHospital": { _LootClass = "Hospital"; }; case "Land_a_stationhouse": { _LootClass = "Military"; }; case "Land_Mil_ControlTower": { _LootClass = "Military"; }; case "Land_SS_hangar": { _LootClass = "Military"; }; case "Land_Mil_House": { _LootClass = "Military"; }; case "Camp": { _LootClass = "Military"; }; case "CampEast": { _LootClass = "Military"; }; case "CampEast_EP1": { _LootClass = "Military"; }; case "Land_Mil_Barracks_i": { _LootClass = "MilitarySpecial"; }; case "Land_A_Villa_EP1": { _LootClass = "MilitarySpecial"; _positions = [[-23.3442,1.71484,-3.65929],[14.5498,-5.69775,-5.06722],[5.8457,-2.09814,-5.06717],[9.5249,3.76563,-5.06717],[10.0454,11.5093,-5.0734],[0.268555,8.64648,-5.06699],[-0.378906,15.3989,-5.06724],[-6.68506,14.9448,-5.06722],[-10.9644,13.0996,-5.06719],[11.0571,4.48926,-1.48401],[2.85938,9.12939,-1.48407],[-3.87646,8.01416,-1.4844],[0.0537109,10.3984,-1.4844],[-2.78467,13.5903,-1.4844],[-0.118652,15.3394,-1.4844],[-6.73779,15.772,-1.4844],[-8.39453,13.5249,-1.4844],[-10.5317,9.75146,-1.4844],[-11.8062,14.2358,-1.4844],[-15.5771,14.0396,-1.4844]]; }; case "Land_Misc_deerstand": { _LootClass = "Hunting"; }; case "Land_stodola_old_open": { _LootClass = "Farm"; }; case "Land_Farm_Cowshed_a": { _LootClass = "Farm"; }; case "Land_stodola_open": { _LootClass = "Farm"; }; case "Land_Barn_W_01": { _LootClass = "Farm"; }; case "Land_Barn_W_02": { _LootClass = "Farm"; }; default { _LootClass = "Residential"; }; };
å°±æ˜¯è¯´ä½ æŠŠä¸‹é¢æ¦å™¨è£…备代ç åŠ ä¸Š,仔细看,ä¾‹å¦‚ä½œè€…æ‰€è¯´åŠ ä¸ŠAS50ï¼ŒåŒæ—¶ä¹Ÿè¦æ³¨æ„æ ‡ç‚¹ç¬¦å·ï¼Œå°‘å¹´ï¼Œä½ è¿˜å¤ªå¹´è½»ï¼