Jump to content
GEORGE FLOROS GR

Buildings classnames and Replacement script

Recommended Posts

This script , is for replacing automatically , the Buildings in any map.

 

		     //["Building to replace","replaced Building"]
myBuildings = [["Land_i_Stone_HouseSmall_V3_F","Land_HouseV_1I4",0],
               ["Land_i_House_Big_02_V3_F","Land_HouseV_1T",0],
               ["Land_i_Stone_HouseBig_V2_F","Land_HouseV_2T2",0],
               ["Land_i_House_Big_01_V1_F","Land_HouseV2_01A",0],              
               ["Land_i_Shop_02_V1_F","Land_HouseBlock_C2",0],
               ["Land_i_Shop_02_V3_F","Land_HouseBlock_C5",0],
               ["Land_Slum_House01_F","Land_Shed_W4",0],
               ["Land_Hut06","Land_Shed_W02",0],			   
               ["Land_i_Shop_02_V2_F","Land_HouseBlock_B5",0],	
               ["Land_Slum_House03_F","Land_HouseBlock_B3",0],		
               ["Land_i_House_Small_01_V3_F","Land_HouseBlock_B4",0],	
               ["Land_i_House_Small_01_V2_F","Land_HouseBlock_A1",0],				   
               ["Land_Kiosk_gyros_F","Land_HouseBlock_C4",0],	
               ["Land_d_House_Big_01_V1_F","Land_HouseBlock_C3",0],				   
               ["Land_Unfinished_Building_01_F","Land_HouseBlock_B6",0],	
               ["Land_Factory_Main_F","Land_Ind_Pec_03a",0],	
               ["Land_MilOffices_V1_F","Land_a_stationhouse",0],
               ["Land_i_Stone_HouseBig_V3_dam_F","Land_HouseV_3I2",0],
               ["Land_i_Shed_Ind_F","Land_Shed_Ind02",0],
               ["Land_CarService_F","Land_Repair_center",0],			   
               ["Misc_Cargo1Bo_civil","Land_Shed_M02",0],
               ["Land_i_Stone_HouseBig_V2_dam_F","Land_HouseV_1L1",0],
               ["Land_i_Stone_HouseBig_V1_dam_F","Land_HouseV_1I1",0],
               ["Land_FuelStation_Build_F","Land_Misc_WaterStation",0],
               ["Land_Chapel_V2_F","Land_Church_02a",0],	
               ["Land_i_Stone_Shed_V3_F","Land_HouseV_2L",0],
               ["Land_Chapel_V1_F","Land_HouseV_2I",0],
               ["Land_i_Barracks_V1_F","Land_Mil_House",0],		
               ["Land_Mil_Barracks_i","Land_Mil_Barracks",0],			
               ["Land_Cargo_HQ_V3_F","Land_Mil_Barracks_L",0],	
               ["Land_Airport_Tower_F","Land_Mil_ControlTower",0]                       
               ];		

for "_i" from 0 to(count myBuildings-1) do {

    _CurrentBuilding 	 = (myBuildings select _i) select 0;
    _ReplacementBuilding = (myBuildings select _i) select 1;	
    _DirectionOffset 	 = (myBuildings select _i) select 2;	
    

    {
        systemchat format["getPosATL: %2 getDir: %4 _CurrentBuilding %5",getpos _x, getPosATL _x, getPosASL _x, getdir _x, _x];	
        //diag_log format["getPosATL: %1 getDir: %2 _CurrentBuilding %3 _ReplacementBuilding %4 _x %5", getPosATL _x, getdir _x, _CurrentBuilding, _ReplacementBuilding, _x];	
        hideObjectGlobal  _x;
    
        _myReplacement = createVehicle [_ReplacementBuilding, getPosATL _x, [], 0, "CAN_COLLIDE"];
        _myReplacement setDir (getdir _x) + _DirectionOffset;
        _myReplacement setPosATL (getPosATL _x) ;
        _myReplacement enableSimulationGlobal false;
    } forEach nearestObjects [markerpos "center", [_CurrentBuilding], 25000];


};
hint "Replacmentscript end";

Thanks!

 

and also for trees (p3d) replacement:

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 7/2/2018 at 9:28 PM, GEORGE FLOROS GR said:

also this is for checking the class:

 

in the init.sqf :

player addAction ["Check object class (cursor)", "checkclass.sqf"];
execvm "checkclass.sqf";

 

checkclass.sqf


hint str [getModelInfo cursorObject, typeOf cursorObject];
copyToClipboard str [getModelInfo cursorObject, typeOf cursorObject];
  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×