Jump to content
[evo] dan

Barrel not destroying after being blown up

Recommended Posts

Hi all,

 

I've recently started making models for Arma, and have gotten around to configuring them to work ingame.

 

I have managed to get the object to be able to be slingloaded, however, if I drop the object from some height, I wish the model to either explode or change to a wreck model when it 'dies'. I think it dies if I drop it from a height or shoot it a load already as it stops being able to be slingloaded after said conditions. I've got multiple versions and the wreck model in the config and these are placeable within the editor.

 

I had a look at destrType but I couldn't get it to seemingly do anything. Can anyone provide me with some advice on making it explode on or change to wreck once it reaches the condition where I can't slingload it? (which should also be its 'dead' state)

 

Heres my config.cpp:

class CfgPatches {
	class dan_barrels {
		units[] = {"dan_oil_barrel_type1", "dan_water_drum", "dan_oil_barrel_type1wreck"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgVehicles {
	class ThingX;
	class dan_oil_barrel_type1 : ThingX
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		displayName = "Skydrol Drum";
		vehicleClass = "small_items";
		armor = 30;
		fireResistance = 5;
		slingLoadCargoMemoryPoints[] = 
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2"
		};
		class Hitpoints
		{
			class HitBody 
			{
				armor = 30; 
				name = "Barrel_Hull"; 
				passThrough = 1;
				material = -1;
				minimalHit = 0.05;
			};
		};
		class EventHandlers;
	};
	class dan_water_drum : dan_oil_barrel_type1 {
		scope = 2;
		displayName = "Water Drum";
		hiddenSelections[] = {"CAMO_All"};
		hiddenSelectionsTextures[] = {"\Dan_Barrels\Oil_Barrel_Type1Water_Texture.paa"};
	};
	class dan_oil_barrel_type1wreck : ThingX
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1_Wreck.p3d";
		displayName = "Wrecked Barrel";
		vehicleClass = "small_items";
	}; 
};

Share this post


Link to post
Share on other sites

Still haven't been able to get this to work in the way I want.

 

I want to try and get the destruction effect to be like the ammoboxes when they get destroyed. Anybody able to point me in the right direction on how to do this?

Share this post


Link to post
Share on other sites

Thanks for that link. I've tried looking at that link and this link:

 

https://forums.bistudio.com/topic/123483-example-of-damage-to-model/

 

However, my model does recognise that it 'dies' via a trigger to check it in the editor. However nothing happens at all after it says its died. Only takes just over a mag of Vermin ammo to kill it which is ok for testing purposes so i'll change that later. If I use explosives it just flies off in any direction a short distance.

 

Heres my config.cpp:

class CfgPatches {
	class dan_barrels {
		units[] = {"dan_oil_barrel_type1", "dan_water_drum", "dan_oil_barrel_type1wreck"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgVehicles {
	class ThingX;
	class HouseBase;
	class Ruins: HouseBase{};
	class dan_oil_barrel_type1 : ThingX
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		displayName = "Skydrol Drum";
		class DestructionEffects;
		vehicleClass = "small_items";
		destrType = "DestructBuilding";
		armor = 30;
		fireResistance = 0.1;
		explosionShielding = 0.1;
		damageResistance = 0.0004;
		slingLoadCargoMemoryPoints[] = 
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2"
		};
		class Hitpoints
		{
			class Hit1
			{
				armor = 30; 
				name = "Barrel_Hull"; 
				passThrough = 1;
				material = -1;
				minimalHit = 0.005;
				convexComponent = "Barrel_Hull";
				class DestructionEffects 
				{
					class Ruin1
					{
						simulation = "ruin";
						type = "\Dan_Barrels\Oil_Barrel_Type1_Wreck.p3d"; 
						position = "SlingLoadCargo1";
						intensity = 1;
						interval = 1;
						lifeTime = 1;
					}; 
				};
			};
		};

		class EventHandlers;
	};
	class dan_water_drum : dan_oil_barrel_type1 {
		scope = 2;
		displayName = "Water Drum";
		hiddenSelections[] = {"CAMO_All"};
		hiddenSelectionsTextures[] = {"\Dan_Barrels\Oil_Barrel_Type1Water_Texture.paa"};
		class DestructionEffects;
	};
	class dan_oil_barrel_type1wreck : ruins
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1_Wreck.p3d";
		displayName = "Wrecked Barrel";
		vehicleClass = "small_items";
	}; 
};

And my model.cfg:

class CfgSkeletons {
	class dan_barrels_skeleton {
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = {"Barrel_Hull"};		
	};
};

class CfgModels {
	class Oil_Barrel_Type1 {
		skeletonName = "dan_barrels_skeleton";
		sections[] = {"CAMO_All","Barrel_Hull"};
	};
};

class Animations
{
	class Hit1
   	{
    		type="hide";
		source="Hit1";
		selection="Barrel_Hull";
                minValue = 0;
                maxValue = 1;
                minphase = 0;
                maxphase =1;
		hideValue = 0.9;
	};
};

Am I missing a class somewhere in this as I just cant put my finger on it and I've been trying all of this evening to try and get it to work.

 

Am I using the wrong destrType now or something?

Share this post


Link to post
Share on other sites

Out of interest, I'm having a look in the Splendid config viewer and there are things with different colours but no legend to what they mean. Is this supposed to represent inherritance or whether a parameter is private or something?

 

I've had a bit more of a play having had a look through the ammobox's config in the viewer. I'm closer but still not quite there yet. What happens with the following config to get the object to smoke and then disappear into the ground once 'killed'.

class CfgPatches {
	class dan_barrels {
		units[] = {"dan_oil_barrel_type1", "dan_water_drum", "dan_oil_barrel_type1wreck"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgVehicles {
	class ThingX;
	class dan_oil_barrel_type1 : ThingX
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		displayName = "Skydrol Drum";
		vehicleClass = "small_items";
		destrType = "DestructBuilding";
		armor = 30;
		fireResistance = 0.1;
		explosionShielding = 0.1;
		damageResistance = 0.004;
		slingLoadCargoMemoryPoints[] = 
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2"
		};
		class DestructionEffects
		{
			class HouseDestr
			{
				intensity = 1;
				interval = 1;
				lifeTime = 10;
				position = "";
				simulation = "destroy";
				type = "DelayedDestructionAmmoBox";
			};
			class Smoke2
			{
				intensity = 1;
				interval = 1;
				lifeTime = 10;
				position = "";
				simulation = "particles";
				type = "AmmoSmokeParticles2";
			};
		};
		selectionDamage = "Barrel_Hull";
	};
	class dan_water_drum : dan_oil_barrel_type1 {
		scope = 2;
		displayName = "Water Drum";
		hiddenSelections[] = {"CAMO_All"};
		hiddenSelectionsTextures[] = {"\Dan_Barrels\Oil_Barrel_Type1Water_Texture.paa"};
	};
	class dan_oil_barrel_type1wreck : dan_oil_barrel_type1
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1_Wreck.p3d";
		displayName = "Wrecked Barrel";
		vehicleClass = "small_items";
	}; 
};

However, this isn't quite what I want it to do. I've tried changing it to destrType = "DestructWreck"; but all this does is cause it to smoke without it falling through the floor now. Looking through the config's in the viewer, things such as the ammotruck use this class, but I cannot figure out how it switches to the wreck model even though I have the wreck model defined and within the config file and has a proxy setup within the p3d file to the wreck model. I've looked on the config megalist as well as on the 2 references but I cannot find anything on the DestructWreck type, can anybody shed some light on this?

Share this post


Link to post
Share on other sites

I think I might have set my proxy up wrong as I still cant get it to transition from the model smoking to a wreck, can someone check it out for me please?

 

https://www.dropbox.com/s/quui40vqul78qq7/Dan_Barrels.rar?dl=0​

 

Do I need to put the proxy triangles into the wreck p3d for it to work or is this post just speculation?

 

http://tactical.nekromantix.com/wiki/doku.php?id=arma2:modeling:wreck

 

Or does ThingX not support wrecks?

 

Changed my config to the following:

class CfgPatches {
	class dan_barrels {
		units[] = {"dan_oil_barrel_type1", "dan_water_drum", "dan_oil_barrel_type1wreck"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgVehicles {
	class ThingX;
	class Wreck;
	class dan_oil_barrel_type1 : ThingX
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		displayName = "Skydrol Drum";
		vehicleClass = "small_items";
		destrType = "DestructWreck";
		armor = 30;
		fireResistance = 0.1;
		explosionShielding = 0.1;
		damageResistance = 0.004;
		slingLoadCargoMemoryPoints[] = 
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2"
		};
		class DestructionEffects
		{
			class Smoke1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmokeSmall";
			};
			class Smoke2
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmoke2";
			};
			class DestroyPhase1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "destroy";
				type = "\Dan_Barrels\Oil_Barrel_Type1_Wreck";
			};
			class Fire1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionFire1Small";
			};
		};
	};
	class dan_water_drum : dan_oil_barrel_type1 {
		scope = 2;
		displayName = "Water Drum";
		hiddenSelections[] = {"CAMO_All"};
		hiddenSelectionsTextures[] = {"\Dan_Barrels\Oil_Barrel_Type1Water_Texture.paa"};
	};
	class dan_oil_barrel_type1wreck : Wreck
	{
		scope = 1;
		model = "\Dan_Barrels\Oil_Barrel_Type1_Wreck.p3d";
		class Eventhandlers{};
	}; 
};

Got the following error when I "killed" it:

 

22:18:03 Warning Message: No entry 'bin\config.bin/CfgDestructPos.\dan_barrels\oil_barrel_type1_wreck'.
22:18:03 Warning Message: No entry '.timeBeforeHiding'.
22:18:03 Warning Message: '/' is not a value
22:18:03 Warning Message: No entry '.hideDuration'.
22:18:03 Warning Message: '/' is not a value

 

I have no clue what to do about it but I'm guessing I've missed a class somewhere? (in destroyphase perhaps I need a different simulation?)

Share this post


Link to post
Share on other sites

I've just been having a bit more of a play. I've got the wreck model to work by using the 'Plane' and 'PlaneWreck' classes. I get the impression that ThingX doesn't allow you to use wrecks, or that I am simply calling the 'Wreck' class wrong with it. Anybody confirm this or give me some pointers on how to get it to work correctly?

 

Only problem with inheriting from the plane class is that I get the plane destruction effects by default and i'm unsure how to get rid of them and stick with the custom ones I've setup.

 

Anyway, heres my config.cpp that I used to get it to work:

class CfgPatches {
	class dan_barrels {
		units[] = {"dan_oil_barrel_type1", "dan_water_drum", "dan_oil_barrel_type1_wreck"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgDestructPos{
	class dan_barrel_destruct
	{
		timeBeforeHiding = 3;
		hideDuration = 0.2;
	};
};

class CfgVehicles {
	class ThingX;
	class Wreck;
	class Air;
	class PlaneWreck;
	class Plane: Air
	{
		
	};
	class dan_oil_barrel_type1 : Plane
	{
		scope = 2;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		displayName = "Skydrol Drum";
		vehicleClass = "small_items";
		destrType = "DestructWreck";
		armor = 30;
		fireResistance = 0.1;
		explosionShielding = 0.1;
		damageResistance = 0.004;
		slingLoadCargoMemoryPoints[] = 
		{
			"SlingLoadCargo1",
			"SlingLoadCargo2"
		};
		class Damage
		{
			tex[] = {};
			mat[] = {};
		};
		damageHalf[] = {};
		damageFull[] = {};
		class DestructionEffects
		{
			class Smoke1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmokeSmall";
			};
			class Smoke2
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmoke2";
			};
			class DestroyPhase1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "destroy";
				type = "dan_barrel_destruct";
			};
			class Fire1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 2;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionFire1Small";
			};
		};
	};
	class dan_water_drum : dan_oil_barrel_type1 {
		scope = 2;
		displayName = "Water Drum";
		hiddenSelections[] = {"CAMO_All"};
		hiddenSelectionsTextures[] = {"\Dan_Barrels\Oil_Barrel_Type1Water_Texture.paa"};
	};
	class dan_oil_barrel_type1_wreck : PlaneWreck
	{
		scope = 1;
		model = "\Dan_Barrels\Oil_Barrel_Type1.p3d";
		class Eventhandlers{};
		typicalCargo[] = {};
		irTarget = 0;
		transportAmmo = 0;
		transportRepair = 0;
		transportFuel = 0;
		transportSoldier = 4;
		class Eventhandlers{};
	}; 
};

Share this post


Link to post
Share on other sites

If its an oil barrel why not inherit from a pre-existing static object, such as a house? Why a plane? Presumably because of the desired sling-loading.

Wouldn't another sling-loadable static object be a more intelligent choice such as a shipping container or something similar...

Share this post


Link to post
Share on other sites

If its an oil barrel why not inherit from a pre-existing static object, such as a house? Why a plane? Presumably because of the desired sling-loading.

Wouldn't another sling-loadable static object be a more intelligent choice such as a shipping container or something similar...

 

I used a plane just to see if it was me configuring it wrong or the thingX class. I still want to use the thingX class if I can as thats better suited (provided it supports wrecks). I don't think the container has a wreck model if i remember correctly. I'll have a check though.

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

×