Jump to content

Recommended Posts

1 minute ago, TPM_Aus said:

thanks 😄

 

You 're welcome !

Share this post


Link to post
Share on other sites

Just to know , you don't have to change the marker size in the editor ,

but change the settings in the init.

Share this post


Link to post
Share on other sites
4 minutes ago, GEORGE FLOROS GR said:

Just to know , you don't have to change the marker size in the editor ,

but change the settings in the init.


Yeah I know, I am just using it for reference.  Making sure I only blacklist the buildings/area I am after.

  • Like 1

Share this post


Link to post
Share on other sites

Oh, so the script even changes editor placed buildings.  Thats pretty cool.

FYI, Ravage loot appears after the building replacement script has been run.  Once I have the Building Replacement Script settings setup the way I want it, I will be moving on to adding a few more of your scripts.  I am sure I will end up asking you questions in those post 😄

  • Like 1

Share this post


Link to post
Share on other sites

Changelog:

 

v2.0
Added a distance check and blacklist zones
Added more options

 

news_download_a3_3.png

GF Building Replacement Script - Mod

  • Like 1

Share this post


Link to post
Share on other sites

Forgive me its been a few years since I last executed scripts. 

How do you go about using this script? 

  • Like 1

Share this post


Link to post
Share on other sites

Hello there  @outlaw2101!

 

Every script is an example test mission , that you can grab the files that you need  ( even every file ) and use it by your needs.

In this mission this script is running from the initserver.sqf , so if you haven't got this , you can use this one as well.

If you have any more issues feel free to ask for help !

See you !

Share this post


Link to post
Share on other sites
2 minutes ago, GEORGE FLOROS GR said:

Hello there  @outlaw2101!

 

Every script is an example test mission , that you can grab the files that you need  ( even every file ) and use it by your needs.

In this mission this script is running from the initserver.sqf , so if you haven't got this , you can use this one as well.

If you have any more issues feel free to ask for help !

See you !

Howdy George

Thank you for your fast response.

I remember how to add the script's files to a mission - so I've got that up and running. It tells me the scripts are initialized so I don't think there is a problem there. I'm just trying to replace one building with another as a test but I can't seem to figure it out.

 

Spoiler

Dr63rMD.jpg


Just not sure where to put the class names for the buildings. I want to replace Land_i_Shed_Ind_Old_F on the left there with Land_i_Shed_Ind_F on the right.

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, outlaw2101 said:

Just not sure where to put the class names for the buildings. I want to replace Land_i_Shed_Ind_Old_F on the left there with Land_i_Shed_Ind_F on the right.

 

IS this the only change , or you want to do some more ?

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

 

IS this the only change , or you want to do some more ?

Yes. At this stage this is the only building I want to replace on the map just to test it out. 

 

  • Like 1

Share this post


Link to post
Share on other sites

This script will give a random replacement.

In order to use it in this way , it needs some changes.

I will add here an example , to use it for your needs ok?

Share this post


Link to post
Share on other sites
20 hours ago, GEORGE FLOROS GR said:

This script will give a random replacement.

In order to use it in this way , it needs some changes.

I will add here an example , to use it for your needs ok?

Oh! Sure thing. That's very generous of you. 😁 Thank you.

  • Thanks 1

Share this post


Link to post
Share on other sites
20 hours ago, outlaw2101 said:

Oh! Sure thing. That's very generous of you. 😁 Thank you.

 

Thank you very much @outlaw2101!

 

Stay safe and play arma !

_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
_building_array = nearestObjects [_centerPosition, ["House"], worldsize];

waituntil{time>4};


_debug = true;


//________________ _list _____________
_list = [
	"Land_i_Shed_Ind_F",
	"Land_i_House_Small_03_V1_F"
];


_a = 0;
{

	if(typeOf _x in _list)then{
		
		private _pos = getPosATL _x;
		private _dir = getDir _x;
		private _vectorDirUp = [vectorDir _x, vectorUp _x];
		hideObjectGlobal _x;
		private _new = "";
		
		//________________ _new , add your desired buildings _____________
		switch true do{

			case(typeOf _x isEqualTo "Land_i_Shed_Ind_Old_F") : {_new = "Land_i_Shed_Ind_F";};
			case(typeOf _x isEqualTo "Land_i_House_Small_03_V1_F") : {_new = "Land_Unfinished_Building_01_F";};
			};

		
		if!(_new isEqualTo "")then{
			_a = _a + 1;
			_createVehicle = createVehicle [_new, _pos, [], 0, "CAN_COLLIDE"];
			_createVehicle setDir _dir;
			_createVehicle setVectorDirAndUp _vectorDirUp;
			
				//________________	_debug	_____________

				if(_debug)then{

					_Number = format ["%1",_pos];
					_Marker = createMarker [_Number,getpos _createVehicle];
					_Marker setMarkerShape "ICON";
					_Marker setMarkerType "mil_dot";
					_Marker setMarkerColor "Default";
					//_Text = str [getModelInfo _x];	//	to get the model
					_Text = str [typeOf _x];
					_Marker setMarkerText _Text;
					_Marker setMarkerSize [0.6,0.6];
				};
			};
		};
	hintsilent format["Replaced Buildings : %1 ",_a];
}forEach _building_array;


systemchat "GF Building Replacement Script initialized";

 

Share this post


Link to post
Share on other sites

Hi Folks,

 

I need a little help with a problem i have encountered. I replaced a certain building with another. That works pretty well so far.

 

However, I have the problem that the new building should actually spawn rotated by exactly 180 degrees.

 

Unfortunately, I have not yet figured out how to do this in the script. Is there a solution for this? And if so, would anyone be willing to show them to me?

 

 

Regards

 

 

Anhor

 

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

×