Jump to content

[How To] [CPC] Indestructible Bases


ToejaM

Recommended Posts

  • 3 months later...
  • 2 months later...

Ok, so I'm looking at the code on the first post... and there is an if statement that doesn't close... what's supposed to be after that? and again in part 2 there is an else statement that is left open... What are those two blocks of missing code supposed to be?

Link to comment
Share on other sites

  • 4 weeks later...

Ok, so I'm looking at the code on the first post... and there is an if statement that doesn't close... what's supposed to be after that? and again in part 2 there is an else statement that is left open... What are those two blocks of missing code supposed to be?

 

The original instructions in the first post were for a much earlier version of epoch.

as such, server_monitor.sqf has changed.

 

It's actually really simple to make it work with 1.0.5.1

This is copypaste from my mission. and i have extra buildables, and some of those buildables i dont want simulation disabled.  but still want the damage handler removed.

these arrays are setup so doors can be destroyed, edit them to however you see fit.

 

after this

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

but before this

_hiveLoaded = false;

paste

// ### [CPC] Indestructible Buildables Fix
_cpcimmune =[ 
// handle damage false, enablesimulation false
	"CinderWallHalf_DZ",
	"CinderWall_DZ",
	"MetalFloor_DZ",
        "Fence_corrugated_DZ",
	"Fort_RazorWire",
	"FuelPump_DZ",
    	"Hedgehog_DZ",
	"ForestCamoNet_DZ",
	"ForestLargeCamoNet_DZ",
	"Land_CncBlock_Stripes",
	"Land_Fort_Watchtower_EP1",
	"Land_pumpa",
	"LightPole_DZ",
	"MAP_concrete_block",
	"MAP_fort_watchtower",
	"MAP_plot_istan1_rovny",
	"MAP_plot_zed_drevo1",
	"MAP_Wall_Stone",
	"MAP_Wall_TinCom_3",
	"MAP_Wall_TinCom_9",
	"MetalFloor_Preview_DZ",
	"MetalPanel_DZ",
	"RampConcrete",
	"WoodFloorHalf_DZ",
	"WoodFloorQuarter_DZ",
	"WoodFloor_DZ",
	"WoodLargeWallWin_DZ",
	"WoodLargeWall_DZ",
	"WoodRamp_DZ",
	"WoodSmallWallThird_DZ",
	"WoodSmallWall_DZ",
	"WoodStairsRails_DZ",
	"WoodStairsSans_DZ",
	"WoodStairs_DZ",
	"WorkBench_DZ"
];

_cpcimmuneAnim = [ 
// handle damage false, enable simulation true
	"ZavoraAnim",
        "DeerStand",
	"WoodLadder_DZ",
	"WoodShack_DZ",
	"WoodCrate_DZ",
	"VaultStorageLocked",
	"TentStorageDomed2",
	"TentStorage",
	"StorageShed_DZ",
	"SandNest_DZ",
	"Sandbag1_DZ",
	"Plastic_Pole_EP1_DZ",
        "M240Nest_DZ",
        "Land_Campfire",
        "FireBarrel_DZ",
        "BagFenceRound_DZ",
        "GunRack_DZ",
        "OutHouse_DZ"
];
// ### [CPC] Indestructible Buildables Fix

search for

//Create it

underneath this line you should see _object = createvehicle, and _object setVariable a few times.

beneath the _object setvariable lines,

but before the _lockable = 0; line paste

// ### [CPC] Indestructible Buildables Fix
			if (typeOf(_object) in _cpcimmune) then 
				{
					_object addEventHandler ["HandleDamage", {false}];
					_object enableSimulation false;
				};
				
			if (typeOf(_object) in _cpcimmuneAnim) then 
				{
					_object addEventHandler ["HandleDamage", {false}];
					_object enableSimulation true;
				};
			

and thats it, done.

Link to comment
Share on other sites

  • 3 weeks later...

Does anyone know if there's a way to reduce the damage these items take rather than removing it completely?

 

I've found this script which appears to allow a multiplier reduction on things rather than just turning it off, I'd like to make metal and cinder very tough to take down.

 

http://www.armaholic.com/forums.php?m=posts&q=29428

this addeventhandler ["HandleDamage", {
        _unit             = _this select 0;
        _selection         = _this select 1;
        _passedDamage     = _this select 2;
        _source            = _this select 3;
        _projectile     = _this select 4;
        
        _oldDamage = 0;
        _damageMultiplier = 1;
        
        
        switch(_selection)do{
            case("head")    :{_oldDamage = _unit getHitPointDamage "HitHead";};
            case("body")    :{_oldDamage = _unit getHitPointDamage "HitBody";};
            case("hands")    :{_oldDamage = _unit getHitPointDamage "HitHands";};
            case("legs")    :{_oldDamage = _unit getHitPointDamage "HitLegs";};
            case("")        :{_oldDamage = damage _unit;};
            default{};
        };
        
                 
        _return = _oldDamage + ((_passedDamage - _oldDamage) *_damageMultiplier);
        
        _return
    }];
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...