Jump to content

[How To] [CPC] Indestructible Bases


ToejaM

Recommended Posts

Hi guys!

 

Was hoping someone could help with a problem we are having.

Its seems locked cinder garage doors (CinderWallDoorway_DZ) are destructable on our server. We found a base rthat was missing a couple of these doors.

Just the doors, the frame was still there.

We didnt change anything in server_monitor.sqf that wasnt in the first post.

 

_cpcimmune =[
"WoodFloor_DZ",
"WoodFloorHalf_DZ",
"WoodFloorQuarter_DZ",
"Land_DZE_LargeWoodDoorLocked",
"WoodLargeWallDoor_DZ",
"WoodLargeWallWin_DZ",
"WoodLargeWall_DZ",
"Land_DZE_WoodDoorLocked",
"WoodSmallWallDoor_DZ",
"WoodSmallWallWin_DZ",
"Land_DZE_GarageWoodDoor",
"Land_DZE_GarageWoodDoorLocked",
"WoodLadder_DZ",
"WoodStairsSans_DZ",
"WoodStairs_DZ",
"WoodSmallWall_DZ",
"WoodSmallWallThird_DZ",
"CinderWallHalf_DZ",
"CinderWall_DZ",
"CinderWallDoorway_DZ",
"Land_DZE_LargeWoodDoor",
"MetalFloor_DZ",
"CinderWallDoorSmallLocked_DZ",
"CinderWallSmallDoorway_DZ",
"CinderWallDoor_DZ"

 

The older walls and stuff are still there, so I dont think its the cleanup script.

 

I have no idea where to look next for this problem, any leads will be great!

 

edit: well that was stupid, you guys already mentioned this a few posts back, I just needed to add CinderWallDoorSmallLocked_DZ to the list above. :)

Link to comment
Share on other sites

 

[CPC] Indestructible Base Fix - PART2: On Object Creation

Step 6)

 

Around line 231 copy to look like this

	// Start Build 
	_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
        // ### [CPC] Indestructible Base Fix	
        _tmpbuilt addEventHandler ["HandleDamage", {false}];
        _tmpbuilt enableSimulation false;
	// ### [CPC] Indestructible Base Fix

I'm using OtterNas3's player_build.sqf for maca's build snapping, so where would i put this?

I tried the following on my test server but it didn't work.

_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
	// ### [CPC] Indestructible Base Fix	
        _tmpbuilt addEventHandler ["HandleDamage", {false}];
        _tmpbuilt enableSimulation false;
	// ### [CPC] Indestructible Base Fix
	_object setDir _dir;
	_object attachTo [player,_offset];

Here is all the code for OtterNas3's player_build.sqf:

 

/*
	DayZ Base Building
	Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
*/
/*
Build Snapping - Extended v1.3

Idea and first code:
Maca

Reworked:
OtterNas3
01/11/2014
*/
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_objHupDiff","_needNear","_vehicle","_inVehicle","_previewCounter","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

_onLadder =		(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = 		dayz_isSwimming;
_cancel = false;
_reason = "";
_canBuildOnPlot = false;

_vehicle = vehicle player;
_inVehicle = (_vehicle != player);

DZE_Q = false;
DZE_Z = false;

DZE_Q_alt = false;
DZE_Z_alt = false;

DZE_Q_ctrl = false;
DZE_Z_ctrl = false;

DZE_5 = false;
DZE_4 = false;
DZE_6 = false;

DZE_cancelBuilding = false;

call gear_ui_init;
closeDialog 1;

if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};

_item =	_this;

// Need Near Requirements
_abort = false;
_distance = 3;
_reason = "";

_needNear = 	getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "neednearby");

{
	_need = _x select 0;
	_distance = _x select 1;
	switch(_need) do{
		case "fire":
		{
			_isNear = {inflamed _x} count (getPosATL player nearObjects _distance);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "fire";
			};
		};
		case "workshop":
		{
			_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "workshop";
			};
		};
		case "fueltank":
		{
			_isNear = count (nearestObjects [player, dayz_fuelsources, _distance]);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "fuel tank";
			};
		};
	};
} forEach _needNear;


if(_abort) exitWith {
	cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
	DZE_ActionInProgress = false;
};

_classname = 	getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
_classnametmp = _classname;
_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
_text = 		getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");

_lockable = 0;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then {
	_lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable");
};

_requireplot = DZE_requireplot;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
	_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
};

_isAllowedUnderGround = 1;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then {
	_isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground");
};

_offset = 	getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
if((count _offset) <= 0) then {
	_offset = [0,1.5,0];
};

_isPole = (_classname == "Plastic_Pole_EP1_DZ");
_isLandFireDZ = (_classname == "Land_Fire_DZ");

_distance = 30;
_needText = localize "str_epoch_player_246";

if(_isPole) then {
	_distance = 60;
};

// check for near plot
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
_findNearestPole = [];

{
	if (alive _x) then {
		_findNearestPole set [(count _findNearestPole),_x];
	};
} foreach _findNearestPoles;

_IsNearPlot = count (_findNearestPole);

// If item is plot pole and another one exists within 45m
if(_isPole and _IsNearPlot > 0) exitWith {  DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_44") , "PLAIN DOWN"]; };

if(_IsNearPlot <= 0) then {

	// Allow building of plot
	if(_requireplot == 0 or _isLandFireDZ) then {
		_canBuildOnPlot = true;
	};

} else {
	// Since there are plots nearby we check for ownership and then for friend status
	
	// check nearby plots ownership and then for friend status
	_nearestPole = _findNearestPole select 0;

	// Find owner 
	_ownerID = _nearestPole getVariable["CharacterID","0"];

	// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];

	// check if friendly to owner
	if(dayz_characterID == _ownerID) then {  //Keep ownership
		// owner can build anything within his plot except other plots
		if(!_isPole) then {
			_canBuildOnPlot = true;		
		};

	} else {
		// disallow building plot
		if(!_isPole) then {
			_friendlies		= player getVariable ["friendlyTo",[]];
			// check if friendly to owner
			if(_ownerID in _friendlies) then {
				_canBuildOnPlot = true;
			};
		};
	};
};

// _message
if(!_canBuildOnPlot) exitWith {  DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };

_missing = "";
_hasrequireditem = true;
{
	_hastoolweapon = _x in weapons player;
	if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }
} forEach _require;

_hasbuilditem = _this in magazines player;
if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };

if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
if (_hasrequireditem) then {

	_location = [0,0,0];
	_isOk = true;

	// get inital players position
	_location1 = getPosATL player;
	_dir = getDir player;


	_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
	_object setDir _dir;
	_object attachTo [player,_offset];
	
	_position = getPosATL _object;

	cutText [(localize "str_epoch_player_45"), "PLAIN DOWN"];

	_previewCounter = 60;
	
	player allowDamage false;
	SnappingOffset = _offset;
	SnappingDir = 0;
	SnappingSpotMarkers = [];
	SnappingEnabled = false;
	SnappedOffsetZ = 0;
	SnappingResetPos = false;

	if (isClass (missionConfigFile >> "SnapPoints" >> _classname)) then {
		s_building_snapping = player addAction ["<t color=""#0000ff"">Toggle Snapping</t>", "Scripts\snap_build\player_toggleSnapping.sqf",_classname, 3, true, false, "",""];
	};
	
	_snapper = [_object, _classname] spawn snap_object;
	_key_monitor = [] spawn player_buildControls ;

	while {_isOk} do {
		sleep 1;
		_location2 = getPosATL player;

		if(DZE_5) exitWith {
			_isOk = false;
			detach _object;
			_dir = getDir _object;
			_position = getPosATL _object;
		};

		if(_location1 distance _location2 > 5) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "You've moved to far away from where you started building (within 5 meters)"; 
			detach _object;
		};
		
		[format["<t size='0.6'>Time left to build: %1</t>",(ceil(_previewCounter))],0,0.8,0.5,0,0,8] spawn BIS_fnc_dynamicText;
		
		if(_previewCounter <= 0) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "Ran out of time to find position"; 
			detach _object;
		};

		_previewCounter = _previewCounter - 1;
		
		if(((SnappingOffset select 2) > 5) or ((SnappingOffset select 2) < -5)) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "Cannot move up or down more than 5 meters"; 
			detach _object;
		};

		if (player getVariable["combattimeout", 0] >= time) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = (localize "str_epoch_player_43");
			detach _object;
		};

		if (DZE_cancelBuilding) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "Cancelled building.";
			detach _object;
		};
	};

	terminate _snapper;
	terminate _key_monitor;
	player removeAction s_building_snapping;
	player allowDamage true;
	
	// No building on roads
	if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };

	// No building in trader zones
	if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
	if(!placevault) then { _cancel = true; _reason = "Cannot build in a city."; };

	if(!_cancel) then {

		_classname = _classnametmp;

		_location = _position;

		if((_isAllowedUnderGround == 0) and ((_location select 2) < 0)) then {
			_location set [2,0];
		};
	
		cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
		
		_limit = 3;

		if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
			_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
		};

		_isOk = true;
		_proceed = false;
		_counter = 0;
		
		while {_isOk} do {

			[10,10] call dayz_HungerThirst;
			player playActionNow "Medic";
			
			_dis=20;
			_sfx = "repair";
			[player,_sfx,0,false,_dis] call dayz_zombieSpeak;  
			[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
	
			r_interrupt = false;
			_animState = animationState player;
			r_doLoop = true;
			_started = false;
			_finished = false;
	
			while {r_doLoop} do {
				_animState = animationState player;
				_isMedic = ["medic",_animState] call fnc_inString;
				if (_isMedic) then {
					_started = true;
				};
				if (_started and !_isMedic) then {
					r_doLoop = false;
					_finished = true;
				};
				if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
					r_doLoop = false;
				};
				if (DZE_cancelBuilding) exitWith {
					r_doLoop = false;
				};
				sleep 0.1;
			};
			r_doLoop = false;


			if(!_finished) exitWith {
				_isOk = false;
				_proceed = false;
			};

			if(_finished) then {
				_counter = _counter + 1;
			};

			cutText [format[(localize "str_epoch_player_139"),_text, _counter,_limit], "PLAIN DOWN"];

			if(_counter == _limit) exitWith {
				_isOk = false;
				_proceed = true;
			};
	
		};

		if (_proceed) then {
	
			_num_removed = ([player,_item] call BIS_fnc_invRemove);
			if(_num_removed == 1) then {

				cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];

				_object setVariable ["OEMPos",_location,true];

				if(_lockable > 1) then {
					
					_combinationDisplay = "";

					switch (_lockable) do {
						
						case 2: { // 2 lockbox
							_combination_1 = (floor(random 3)) + 100; // 100=red,101=green,102=blue
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];

							if (_combination_1 == 100) then {
								_combination_1_Display = "Red";
							};
							if (_combination_1 == 101) then {
								_combination_1_Display = "Green";
							};
							if (_combination_1 == 102) then {
								_combination_1_Display = "Blue";
							};
							_combinationDisplay = format["%1%2%3",_combination_1_Display,_combination_2,_combination_3];
						};
						
						case 3: { // 3 combolock
							_combination_1 = floor(random 10);
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
							_combinationDisplay = _combination;
						};
						
						case 4: { // 4 safe
							_combination_1 = floor(random 10);
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination_4 = floor(random 10);
							_combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
							_combinationDisplay = _combination;
						};
					};

					_object setVariable ["CharacterID",_combination,true];
					

					PVDZE_obj_Publish = [_combination,_object,[_dir,_location],_classname];
					publicVariableServer "PVDZE_obj_Publish";

					cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
					

				} else {
					_object setVariable ["CharacterID",dayz_characterID,true];
					
					// fire?
					if(_object isKindOf "Land_Fire_DZ") then {
						_object spawn player_fireMonitor;
					} else {
						PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];
						publicVariableServer "PVDZE_obj_Publish";
					};
				};
			} else {
				deleteVehicle _object;
				cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
			};

		} else {
			r_interrupt = false;
			if (vehicle player == player) then {
				[objNull, player, rSwitchMove,""] call RE;
				player playActionNow "stop";
			};

			deleteVehicle _object;

			cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
		};

	} else {
		deleteVehicle _object;
		cutText [format[(localize "str_epoch_player_47"),_text,_reason], "PLAIN DOWN"];
	};
};

DZE_ActionInProgress = false;

Link to comment
Share on other sites

_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
	// ### [CPC] Indestructible Base Fix	
        _tmpbuilt addEventHandler ["HandleDamage", {false}];
        _tmpbuilt enableSimulation false;
	// ### [CPC] Indestructible Base Fix
	_object setDir _dir;
	_object attachTo [player,_offset];

 

change the _tmpbuilt to _object so it looks like this:

_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
    // ### [CPC] Indestructible Base Fix    
_object addEventHandler ["HandleDamage", {false}];
_object enableSimulation false;
    // ### [CPC] Indestructible Base Fix
    _object setDir _dir;
    _object attachTo [player,_offset];
Link to comment
Share on other sites

Hello everyone..I hope someone can help me with  Indestructible Bases. 

What is our problem and what we could really use help with is that our Doors/Garage can be only destroyed but with one c4.. is there any chance to make or give more armor to them?

lets say 3-4 c4 istead of 1..

Really need help with it its a bit bad when 1 c4 can demolish whole base.


Reallly need your help..

private ["_nul","_result","_pos","_wsDone","_dir","_block","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_date","_key","_outcome","_vehLimit","_hiveResponse","_objectCount","_codeCount","_objectArray","_hour","_minute","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0"];

dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
    // ### [CPC] Indestructible Buildables Fix
    _cpcimmune =[
    "WoodFloor_DZ",
    "WoodFloorHalf_DZ",
    "WoodFloorQuarter_DZ",
    "WoodLargeWallWin_DZ",
    "WoodLargeWall_DZ",
    "WoodSmallWallWin_DZ",
    "WoodLadder_DZ",
    "WoodStairsSans_DZ",
    "WoodStairs_DZ",
    "WoodSmallWall_DZ",
    "WoodSmallWallThird_DZ",
    "CinderWallHalf_DZ",
    "CinderWall_DZ",
    "MetalFloor_DZ"
    ];
    // ### [CPC] Indestructible Buildables Fix
if ((count playableUnits == 0) and !isDedicated) then {
	isSinglePlayer = true;
};

waitUntil{initialized}; //means all the functions are now defined

diag_log "HIVE: Starting";

waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
	
// Custom Configs
if(isnil "MaxVehicleLimit") then {
	MaxVehicleLimit = 500;
};
if(isnil "MaxHeliCrashes") then {
	MaxHeliCrashes = 5;
};
if(isnil "MaxDynamicDebris") then {
	MaxDynamicDebris = 100;
};
if(isnil "MaxAmmoBoxes") then {
	MaxAmmoBoxes = 3;
};
if(isnil "MaxMineVeins") then {
	MaxMineVeins = 50;
};
// Custon Configs End

if (isServer and isNil "sm_done") then {

	serverVehicleCounter = [];
	_hiveResponse = [];

	for "_i" from 1 to 5 do {
		diag_log "HIVE: trying to get objects";
		_key = format["CHILD:302:%1:", dayZ_instance];
		_hiveResponse = _key call server_hiveReadWrite;  
		if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
			diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
			_hiveResponse = ["",0];
		} 
		else {
			diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
			_i = 99; // break
		};
	};

	_objectArray = [];
	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
		_objectCount = _hiveResponse select 1;
		diag_log ("HIVE: Commence Object Streaming...");
		for "_i" from 1 to _objectCount do { 
			_hiveResponse = _key call server_hiveReadWriteLarge;
			_objectArray set [_i - 1, _hiveResponse];
			//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
		};
		diag_log ("HIVE: got " + str(count _objectArray) + " objects");
	};

	// # START OF STREAMING #
	_countr = 0;	
	_totalvehicles = 0;
	{
		//Parse Array
		_countr = _countr + 1;

		_idKey = 	_x select 1;
		_type =		_x select 2;
		_ownerID = 	_x select 3;

		_worldspace = _x select 4;
		_intentory=	_x select 5;
		_hitPoints=	_x select 6;
		_fuel =		_x select 7;
		_damage = 	_x select 8;

		_dir = 0;
		_pos = [0,0,0];
		_wsDone = false;
		if (count _worldspace >= 2) then
		{
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};			
		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};

		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
			
			//Create it
			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];

			_lockable = 0;
			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
			};

			// fix for leading zero issues on safe codes after restart
			if (_lockable == 4) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 3) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 2) then {
					_ownerID = format["00%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["000%1", _ownerID];
				};
			};

			if (_lockable == 3) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 2) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["00%1", _ownerID];
				};
			};

			_object setVariable ["CharacterID", _ownerID, true];
			
			clearWeaponCargoGlobal  _object;
			clearMagazineCargoGlobal  _object;
			// _object setVehicleAmmo DZE_vehicleAmmo;
			
			if ((typeOf _object) in dayz_allowedObjects) then {
				_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
				// Test disabling simulation server side on buildables only.
				_object enableSimulation false;
				// used for inplace upgrades and lock/unlock of safe
				_object setVariable ["OEMPos", _pos, true];
			};
			
			_object setdir _dir;
			_object setposATL _pos;
			_object setDamage _damage;
 // ### [CPC] Indestructible Buildables Fix
    if (typeOf(_object) in _cpcimmune) then {
    _object addEventHandler ["HandleDamage", {false}];
    _object enableSimulation false;
    };
    // ### [CPC] Indestructible Buildables Fix	
			if (count _intentory > 0) then {
				if (_type in DZE_LockedStorage) then {
					// Fill variables with loot
					_object setVariable ["WeaponCargo", (_intentory select 0), true];
					_object setVariable ["MagazineCargo", (_intentory select 1), true];
					_object setVariable ["BackpackCargo", (_intentory select 2), true];
				} else {

					//Add weapons
					_objWpnTypes = (_intentory select 0) select 0;
					_objWpnQty = (_intentory select 0) select 1;
					_countr = 0;					
					{
						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
						};
						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes; 
				
					//Add Magazines
					_objWpnTypes = (_intentory select 1) select 0;
					_objWpnQty = (_intentory select 1) select 1;
					_countr = 0;
					{
						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
						if (_x == "ItemTent") then { _x = "ItemTentOld" };
						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;

					//Add Backpacks
					_objWpnTypes = (_intentory select 2) select 0;
					_objWpnQty = (_intentory select 2) select 1;
					_countr = 0;
					{
						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;
				};
			};	
			
			if (_object isKindOf "AllVehicles") then {
				{
					_selection = _x select 0;
					_dam = _x select 1;
					if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
					[_object,_selection,_dam] call object_setFixServer;
				} forEach _hitpoints;

				_object setFuel _fuel;

				if (!((typeOf _object) in dayz_allowedObjects)) then {
					
					//_object setvelocity [0,0,1];
					_object call fnc_veh_ResetEH;		
					
					if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
						_object setvehiclelock "locked";
					};
					
					_totalvehicles = _totalvehicles + 1;

					// total each vehicle
					serverVehicleCounter set [count serverVehicleCounter,_type];
				};
			};

			//Monitor the object
			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
		};
	} forEach _objectArray;
	// # END OF STREAMING #


	// preload server traders menu data into cache
	{
		// get tids
		_traderData = call compile format["menu_%1;",_x];
		if(!isNil "_traderData") then {
			{
				_traderid = _x select 1;

				_retrader = [];

				_key = format["CHILD:399:%1:",_traderid];
				_data = "HiveEXT" callExtension _key;

				//diag_log "HIVE: Request sent";
		
				//Process result
				_result = call compile format ["%1",_data];
				_status = _result select 0;
		
				if (_status == "ObjectStreamStart") then {
					_val = _result select 1;
					//Stream Objects
					//diag_log ("HIVE: Commence Menu Streaming...");
					call compile format["ServerTcache_%1 = [];",_traderid];
					for "_i" from 1 to _val do {
						_data = "HiveEXT" callExtension _key;
						_result = call compile format ["%1",_data];
						call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
						_retrader set [count _retrader,_result];
					};
					//diag_log ("HIVE: Streamed " + str(_val) + " objects");
				};

			} forEach (_traderData select 0);
Link to comment
Share on other sites

For part 1 in the 1.0.4 update. Where do I place the first section? The original two lines it went between are no longer there.

 

Make it look like this (feel free to copy the whole list, i added more than only the standard building parts):

dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");

// ### [CPC] Indestructible Buildables Fix
_cpcimmune =[
"WoodFloor_DZ",
"WoodFloorHalf_DZ",
"WoodFloorQuarter_DZ",
"Land_DZE_LargeWoodDoorLocked",
"WoodLargeWallDoor_DZ",
"WoodLargeWallWin_DZ",
"WoodLargeWall_DZ",
"Land_DZE_WoodDoorLocked",
"WoodSmallWallDoor_DZ",
"WoodSmallWallWin_DZ",
"Land_DZE_GarageWoodDoor",
"Land_DZE_GarageWoodDoorLocked",
"WoodLadder_DZ",
"WoodStairsSans_DZ",
"WoodStairs_DZ",
"WoodSmallWall_DZ",
"WoodSmallWallThird_DZ",
"CinderWallHalf_DZ",
"CinderWall_DZ",
"CinderWallDoorway_DZ",
"Land_DZE_LargeWoodDoor",
"MetalFloor_DZ",
"CinderWallDoorSmallLocked_DZ",
"CinderWallSmallDoorway_DZ",
"CinderWallDoor_DZ",
"StickFence_DZ",
"Sandbag1_DZ",
"WoodShack_DZ",
"Wooden_shed_DZ",
"StorageShed_DZ",
"BagFenceRound_DZ",
"Fence_corrugated_DZ",
"Land_HBarrier1_DZ",
"Land_HBarrier3_DZ",
"SandNest_DZ",
"CanvasHut_DZ",
"MetalGate_DZ",
"OutHouse_DZ",
"LightPole_DZ",
"DeerStand_DZ",
"MetalPanel_DZ",
"Hedgehog_DZ",
"ForestCamoNet_DZ",
"DesertCamoNet_DZ",
"ForestLargeCamoNet_DZ",
"DesertLargeCamoNet_DZ"
];
// ### [CPC] Indestructible Buildables Fix

waitUntil{initialized}; //means all the functions are now defined

diag_log "HIVE: Starting";

Link to comment
Share on other sites

Part 4b of the install is for axe cops maintain area script but now that it is a part of epoch there is no need to install the script.

 

What is needed to be done to enable the maintain area to be indestructible or is it covered by 4a?

 

I'm wondering about this as well, seems that maintenance isn't working (or i did something wrong.)

Link to comment
Share on other sites

Are you using 1.0.4b ? the hot fix was meant to address this issue, i've applied the fix but not tested yet.

 

I did, i actually said that maintenance isn't working, but i meant the decay i think. I did set it on x amount of days in the hive settings file (also without the ; in front of it). It just keeps saying that there are 0 building parts in the area

Link to comment
Share on other sites

I'm having the same problem with the decay.

I'm probably miles off but is it possible that by making the parts indestructible that this also prevents the decay from happening?

Would there be anyway to make a simple sqf file that can be run from the init.sqf that basically reads the damage for all indestructible parts in the database and if it's at 0 it changes it to 0.5

Link to comment
Share on other sites

So i've tried this now on 2 versions, couldn't get it working on 1.0.3.1, now i've tried 1.0.4b, and sometimes i load into the game but get stuck at debug, other times i cant load into the game and get stuck on requesting authentication. All i want to have is Part 1, where after restart, built items are indestructible, everything else I don't care for.
 

My Server_Monitor.sqf looks like this,

aprivate ["_nul","_result","_pos","_wsDone","_dir","_block","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue"];

dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");

// ### [CPC] Indestructible Buildables Fix
_cpcimmune =[
"WoodFloor_DZ",
"WoodFloorHalf_DZ",
"WoodFloorQuarter_DZ",
"Land_DZE_LargeWoodDoorLocked",
"WoodLargeWallDoor_DZ",
"WoodLargeWallWin_DZ",
"WoodLargeWall_DZ",
"Land_DZE_WoodDoorLocked",
"WoodSmallWallDoor_DZ",
"WoodSmallWallWin_DZ",
"Land_DZE_GarageWoodDoor",
"Land_DZE_GarageWoodDoorLocked",
"WoodLadder_DZ",
"WoodStairsSans_DZ",
"WoodStairs_DZ",
"WoodSmallWall_DZ",
"WoodSmallWallThird_DZ",
"CinderWallHalf_DZ",
"CinderWall_DZ",
"CinderWallDoorway_DZ",
"Land_DZE_LargeWoodDoor",
"MetalFloor_DZ",
"CinderWallDoorSmallLocked_DZ",
"CinderWallSmallDoorway_DZ",
"CinderWallDoor_DZ",
"StickFence_DZ",
"Sandbag1_DZ",
"WoodShack_DZ",
"Wooden_shed_DZ",
"StorageShed_DZ",
"BagFenceRound_DZ",
"Fence_corrugated_DZ",
"Land_HBarrier1_DZ",
"Land_HBarrier3_DZ",
"SandNest_DZ",
"CanvasHut_DZ",
"MetalGate_DZ",
"OutHouse_DZ",
"LightPole_DZ",
"DeerStand_DZ",
"MetalPanel_DZ",
"Hedgehog_DZ",
"ForestCamoNet_DZ",
"DesertCamoNet_DZ",
"ForestLargeCamoNet_DZ",
"DesertLargeCamoNet_DZ"
];
// ### [CPC] Indestructible Buildables Fix

waitUntil{initialized}; //means all the functions are now defined

diag_log "HIVE: Starting";

waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
	
// Custom Configs
if(isnil "MaxVehicleLimit") then {
	MaxVehicleLimit = 50;
};

if(isnil "MaxDynamicDebris") then {
	MaxDynamicDebris = 100;
};
if(isnil "MaxAmmoBoxes") then {
	MaxAmmoBoxes = 3;
};
if(isnil "MaxMineVeins") then {
	MaxMineVeins = 50;
};
// Custon Configs End

if (isServer and isNil "sm_done") then {

	serverVehicleCounter = [];
	_hiveResponse = [];

	for "_i" from 1 to 5 do {
		diag_log "HIVE: trying to get objects";
		_key = format["CHILD:302:%1:", dayZ_instance];
		_hiveResponse = _key call server_hiveReadWrite;  
		if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
			diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
			_hiveResponse = ["",0];
		} 
		else {
			diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
			_i = 99; // break
		};
	};
	
	_BuildingQueue = [];
	_objectQueue = [];
	
	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
		diag_log ("HIVE: Commence Object Streaming...");
		_key = format["CHILD:302:%1:", dayZ_instance];
		_objectCount = _hiveResponse select 1;
		_bQty = 0;
		_vQty = 0;
		for "_i" from 1 to _objectCount do {
			_hiveResponse = _key call server_hiveReadWriteLarge;
			//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
			if ((_hiveResponse select 2) isKindOf "ModularItems") then {
				_BuildingQueue set [_bQty,_hiveResponse];
				_bQty = _bQty + 1;
			} else {
				_objectQueue set [_vQty,_hiveResponse];
				_vQty = _vQty + 1;
			};
		};
		diag_log ("HIVE: got " + str(_bQty) + " Epoch Objects and " + str(_vQty) + " Vehicles");
	};
	
	// # NOW SPAWN OBJECTS #
	_totalvehicles = 0;
	{
		_idKey = 		_x select 1;
		_type =			_x select 2;
		_ownerID = 		_x select 3;

		_worldspace = 	_x select 4;
		_intentory =	_x select 5;
		_hitPoints =	_x select 6;
		_fuel =			_x select 7;
		_damage = 		_x select 8;
		
		_dir = 0;
		_pos = [0,0,0];
		_wsDone = false;
		if (count _worldspace >= 2) then
		{
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};			
		
		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};
		

		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
			
			//Create it
			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];

			_lockable = 0;
			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
			};

			// fix for leading zero issues on safe codes after restart
			if (_lockable == 4) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 3) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 2) then {
					_ownerID = format["00%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["000%1", _ownerID];
				};
			};

			if (_lockable == 3) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 2) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["00%1", _ownerID];
				};
			};

			_object setVariable ["CharacterID", _ownerID, true];
			
			clearWeaponCargoGlobal  _object;
			clearMagazineCargoGlobal  _object;
			// _object setVehicleAmmo DZE_vehicleAmmo;
			
			if ((typeOf _object) in dayz_allowedObjects) then {
				_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
				// Test disabling simulation server side on buildables only.
				_object enableSimulation false;
				// used for inplace upgrades and lock/unlock of safe
				_object setVariable ["OEMPos", _pos, true];
			};
			
			_object setdir _dir;
			_object setposATL _pos;
			_object setDamage _damage;
// ### [CPC] Indestructible Buildables Fix
	if (typeOf(_object) in _cpcimmune) then {
	_object addEventHandler ["HandleDamage", {false}];
	_object enableSimulation false;
	};
// ### [CPC] Indestructible Buildables Fix
			if (count _intentory > 0) then {
				if (_type in DZE_LockedStorage) then {
					// Fill variables with loot
					_object setVariable ["WeaponCargo", (_intentory select 0), true];
					_object setVariable ["MagazineCargo", (_intentory select 1), true];
					_object setVariable ["BackpackCargo", (_intentory select 2), true];
				} else {

					//Add weapons
					_objWpnTypes = (_intentory select 0) select 0;
					_objWpnQty = (_intentory select 0) select 1;
					_countr = 0;					
					{
						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
						};
						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes; 
				
					//Add Magazines
					_objWpnTypes = (_intentory select 1) select 0;
					_objWpnQty = (_intentory select 1) select 1;
					_countr = 0;
					{
						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
						if (_x == "ItemTent") then { _x = "ItemTentOld" };
						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;

					//Add Backpacks
					_objWpnTypes = (_intentory select 2) select 0;
					_objWpnQty = (_intentory select 2) select 1;
					_countr = 0;
					{
						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
						if (_isOK) then {
							_block = 	getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
							if (!_block) then {
								_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
							};
						};
						_countr = _countr + 1;
					} forEach _objWpnTypes;
				};
			};	
			
			if (_object isKindOf "AllVehicles") then {
				{
					_selection = _x select 0;
					_dam = _x select 1;
					if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
					[_object,_selection,_dam] call object_setFixServer;
				} forEach _hitpoints;

				_object setFuel _fuel;

				if (!((typeOf _object) in dayz_allowedObjects)) then {
					
					//_object setvelocity [0,0,1];
					_object call fnc_veh_ResetEH;		
					
					if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
						_object setvehiclelock "locked";
					};
					
					_totalvehicles = _totalvehicles + 1;

					// total each vehicle
					serverVehicleCounter set [count serverVehicleCounter,_type];
				};
			};

			//Monitor the object
			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
		};
	} forEach (_BuildingQueue + _objectQueue);
	// # END SPAWN OBJECTS #
	

	// preload server traders menu data into cache
	{
		// get tids
		_traderData = call compile format["menu_%1;",_x];
		if(!isNil "_traderData") then {
			{
				_traderid = _x select 1;

				_retrader = [];

				_key = format["CHILD:399:%1:",_traderid];
				_data = "HiveEXT" callExtension _key;

				//diag_log "HIVE: Request sent";
		
				//Process result
				_result = call compile format ["%1",_data];
				_status = _result select 0;
		
				if (_status == "ObjectStreamStart") then {
					_val = _result select 1;
					//Stream Objects
					//diag_log ("HIVE: Commence Menu Streaming...");
					call compile format["ServerTcache_%1 = [];",_traderid];
					for "_i" from 1 to _val do {
						_data = "HiveEXT" callExtension _key;
						_result = call compile format ["%1",_data];
						call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
						_retrader set [count _retrader,_result];
					};
					//diag_log ("HIVE: Streamed " + str(_val) + " objects");
				};

			} forEach (_traderData select 0);
		};
	} forEach serverTraders;

	//  spawn_vehicles
	_vehLimit = MaxVehicleLimit - _totalvehicles;
	if(_vehLimit > 0) then {
		diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
		for "_x" from 1 to _vehLimit do {
			[] spawn spawn_vehicles;
		};
	} else {
		diag_log "HIVE: Vehicle Spawn limit reached!";
	};
	//  spawn_roadblocks
	diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
	for "_x" from 1 to MaxDynamicDebris do {
		[] spawn spawn_roadblocks;
	};
	//  spawn_ammosupply at server start 1% of roadblocks
	diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
	for "_x" from 1 to MaxAmmoBoxes do {
		[] spawn spawn_ammosupply;
	};
	// call spawning mining veins
	diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
	for "_x" from 1 to MaxMineVeins do {
		[] spawn spawn_mineveins;
	};

	if(isnil "dayz_MapArea") then {
		dayz_MapArea = 10000;
	};
	if(isnil "HeliCrashArea") then {
		HeliCrashArea = dayz_MapArea / 2;
	};
	if(isnil "OldHeliCrash") then {
		OldHeliCrash = false;
	};

	allowConnection = true;

	// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
	if(OldHeliCrash) then {
		_nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
	};

	if (isDedicated) then {
		// Epoch Events
		_id = [] spawn server_spawnEvents;
		// server cleanup
		[] spawn {
			private ["_id"];
			sleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart
			waitUntil {!isNil "server_spawnCleanAnimals"};
			_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
		};

		// spawn debug box
		_debugMarkerPosition = getMarkerPos "respawn_west";
		_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
		_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
		_vehicle_0 setPos _debugMarkerPosition;
		_vehicle_0 setVariable ["ObjectID","1",true];

		// max number of spawn markers
		if(isnil "spawnMarkerCount") then {
			spawnMarkerCount = 10;
		};
		
		actualSpawnMarkerCount = 0;

		// count valid spawn marker positions
		for "_i" from 0 to spawnMarkerCount do {
			if (!([(getMarkerPos format["spawn%1", _i]), [0,0,0]] call BIS_fnc_areEqual)) then {
				actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
			} else {
				// exit since we did not find any further markers
				_i = spawnMarkerCount + 99;
			};
			
		};
		diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];
	};

	sm_done = true;
	publicVariable "sm_done";
};
 

I can't figure out what i've done wrong, i've read the whole thread, tried everything and still have problems.
Is there anything i'm missing or done wrong?

 


 

Link to comment
Share on other sites

I'm pretty much a noob to this scripting lark. I've managed to get several good ones working on 1.0.4 like lift and tow, snap, refuel and repair and wicked ai and DZai to mention a few. my last one is this one but i'm totally confused. most of you are talking about adding text to files not within my pbo's and there is even some peeps contradicting posts.

 

so could somebody give me a complete run down of how to get this working for a fresh install of epoch with a for dummies tone please.

 

 

p.s.

 

Do the buildings still require maintaining and destroy themselves if they are not?

Edited by Gungy
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...