Jump to content
Sign in to follow this  
Αplion

Building destruct effects

Recommended Posts

Maybe my problem has been reffered in some other topics but as far as I searched and read I haven't found any clear solution ... so here I am ...

I have a building in my map with this config below ...

class CfgPatches 		{

class APLION_Buildings	{
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
	requiredAddons[] = {"CABuildings","CABuildings2","CAData"};
};
};

class CfgVehicleClasses {

class APLION_BuildingsVehicleClass {
	displayName = "ApLion Houses ";
};
};

class CfgVehicles {

class HouseBase;
class House: HouseBase	
{
class DestructionEffects;
};	
class All;
   class Ruins;	
class APLION_Base_Object : House {
	scope = 0;
	side = 3;
	icon = "iconStaticObject";
	nameSound = "object";
	simulation = "house";
	picture = "pictureStaticObject";
	model="";
	sound = "Building";
	placement = "vertical";
	ladders[] = {};
	vehicleClass =  "";
	displayName = "";
	coefInside = 1;
	coefInsideHeur = 0.25;
	mapSize = 7.5;
	animated = 1;
	armor = 300;
	destrType = "DestructBuilding";
	damageResistance = 0.004;

	class DestructionEffects {
		class Sound {
			simulation = "sound";
			type = "DestrHouse";
			position = "destructionEffect1";
			intensity = 1;
			interval = 1;
			lifeTime = 0.05;
		};

		class DestroyPhase1 {
			simulation = "destroy";
			type = "DelayedDestruction";
			lifeTime = 2.5;
			position = "";
			intensity = 1;
			interval = 1;
		};

		class DamageAround1 {
			simulation = "damageAround";
			type = "DamageAroundHouse";
			position = "";
			intensity = 1;
			interval = 1;
			lifeTime = 1;
		};
	};
};

class APLION_Housebase : APLION_Base_Object {
	scope = 1;
	model = "";
	icon = "";
	displayName = "";
	animated = 1;
	vehicleClass = "APLION_BuildingsVehicleClass";
	nameSound = "house";
	accuracy = 0.2;
	typicalCargo[] = {};
	transportAmmo = 0;
	transportRepair = 0;
	transportFuel = 0;
	mapSize = 11;
	cost = 0;
	armor = 800;
	/*extern*/ class DestructionEffects;
};

class Land_build2: APLION_Housebase {
	model = "APLION_buildings\Build1\build2.p3d";
	displayName =  "Diorofo #1"; 
	nameSound = "";						
	mapSize = 8;					
	icon = "iconStaticObject";		
       accuracy = 1000;   
	armor = 200;		
	position = "vertical";
	destrType = "DestructBuilding";		
	scope = 2;							
	class DestructionEffects : DestructionEffects
	{
	class Ruin1
		{
		simulation = "ruin";
		type = "ca\structures\ruins\ruin_01"; 
		position = "";
		intensity = 1;
		interval = 1;
		lifeTime = 1;
		};	
	};

			class Hitglass
                      {
                              armor = 0.0005;
                              material = -1;
                              name = "tzamia";
                              visual = "";
                              passThrough = 0;
                              convexComponent = "tzamia";
                      };				

	class AnimationSources {

		class door_button1 {
			source = "user";
			animPeriod = 1.5; 
			initPhase = 0; 
		};
		class door_button2 {
			source = "user";
			animPeriod = 1.5; 
			initPhase = 0; 
		};			
	};

	class UserActions
	{			
		class Open_door
		{
			displayName="Open Door";
			onlyforplayer = 0;
			position="door_button1";
			radius=2; 
			condition="this animationPhase ""door_button1"" < 0.5";
			statement="this animate [""door_button1"", 1]";
		};
		class Close_Door : Open_door
		{
			displayName="Close Door";
			condition="this animationPhase ""door_button1"" >= 0.5";
			statement="this animate [""door_button1"", 0]";
		};
		class Open_door2
		{
			displayName="Open Door";
			onlyforplayer = 0;
			position="door_button2";
			radius=2; 
			condition="this animationPhase ""door_button2"" < 0.5";
			statement="this animate [""door_button2"", 1]";
		};
		class Close_Door2 : Open_door2
		{
			displayName="Close Door";
			condition="this animationPhase ""door_button2"" >= 0.5";
			statement="this animate [""door_button2"", 0]";
		};
	};
};
};

... my problem is that I want this building to have a much more dust effect when is destructed in order to give better effect during colapse and during ruins revealing period ... plus ... a way to make these ruins to be revealed in the center of my building after destruction and not at the original left place they are by default ...

Can anyone be so kind to help me on these issues as I'm totally lost ?

Please excuse my bad English and let me know if more info needed ...

Aplion

Share this post


Link to post
Share on other sites

hi

for position of ruin make memorry point where you want it in model and when you name Dampos

change here

class Ruin1

{

simulation = "ruin";

type = "ca\structures\ruins\ruin_01";

position = "Dampos";

intensity = 1;

interval = 1;

lifeTime = 1;

};

for smoke try add (change intensity numbers maybe for results )

intensity = 0.15;

See position >> make own position again inn memory lod position = "destructionEffect1";

class Smoke1

{

simulation = "particles";

type = "HouseDestructionSmoke";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 0.05;

};

class Smoke2 : Smoke1

{

type = "HouseDestructionSmoke2";

};

class Smoke3 : Smoke1

{

type = "HouseDestructionSmoke3";

};

class Smoke4 : Smoke1

{

type = "HouseDestructionSmoke4";

};

class Smoke5 : Smoke1

{

type = "HouseDestrSmokeLong";

};

this may help a little , different damage but somethings about config in there

http://forums.bistudio.com/showthread.php?129935-Example-of-Damage-to-Model

Edited by Thromp

Share this post


Link to post
Share on other sites

Thanks Thromp ... I'll give it a try and I'll come back with results ...

---------- Post added at 16:21 ---------- Previous post was at 15:58 ----------

Thromp ... regarding this ...

class Smoke1

{

simulation = "particles";

type = "HouseDestructionSmoke";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 0.05;

};

class Smoke2 : Smoke1

{

type = "HouseDestructionSmoke2";

};

class Smoke3 : Smoke1

{

type = "HouseDestructionSmoke3";

};

class Smoke4 : Smoke1

{

type = "HouseDestructionSmoke4";

};

class Smoke5 : Smoke1

{

type = "HouseDestrSmokeLong";

};

Where I must place it ... in "class DestructionEffects" instead of mine or in "class DestructionEffects : DestructionEffects" of my building ?

Replacing under the "class DestructionEffects" I had no affect so far ...

Share this post


Link to post
Share on other sites

cant really copy paste and see everything here,

it should go in your Base destructioneffects inside if you want all to inherit from it yes or if you just want one Particular building then inside its own

Destrcutioneffects

{

class Ruin1

{

simulation = "ruin";

type = "ca\structures\ruins\ruin_01";

position = "";

intensity = 1;

interval = 1;

lifeTime = 1;

};

class Smoke1

{

simulation = "particles";

type = "HouseDestructionSmoke";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 0.05;

};

class Smoke2 : Smoke1

{

type = "HouseDestructionSmoke2";

};

class Smoke3 : Smoke1

{

type = "HouseDestructionSmoke3";

};

class Smoke4 : Smoke1

{

type = "HouseDestructionSmoke4";

};

class Smoke5 : Smoke1

{

type = "HouseDestrSmokeLong";

};

};

Share this post


Link to post
Share on other sites

I think I did that but ...

class CfgPatches {

class APLION_Buildings {

units[] = {};

weapons[] = {};

requiredVersion = 1.0;

requiredAddons[] = {"CABuildings","CABuildings2","CAData"};

};

};

class CfgVehicleClasses {

class APLION_BuildingsVehicleClass {

displayName = "ApLion Houses ";

};

};

class CfgVehicles {

class HouseBase;

class House: HouseBase

{

class DestructionEffects;

};

class All;

class Ruins;

class APLION_Base_Object : House {

scope = 0;

side = 3;

icon = "iconStaticObject";

nameSound = "object";

simulation = "house";

picture = "pictureStaticObject";

model="";

sound = "Building";

placement = "vertical";

ladders[] = {};

vehicleClass = "";

displayName = "";

coefInside = 1;

coefInsideHeur = 0.25;

mapSize = 7.5;

animated = 1;

armor = 300;

destrType = "DestructBuilding";

damageResistance = 0.004;

class DestructionEffects {

class Smoke1

{

simulation = "particles";

type = "HouseDestructionSmoke";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 0.05;

};

class Smoke2 : Smoke1

{

type = "HouseDestructionSmoke2";

};

class Smoke3 : Smoke1

{

type = "HouseDestructionSmoke3";

};

class Smoke4 : Smoke1

{

type = "HouseDestructionSmoke4";

};

class Smoke5 : Smoke1

{

type = "HouseDestrSmokeLong";

};

class DestroyPhase1 {

simulation = "destroy";

type = "DelayedDestruction";

lifeTime = 2.5;

position = "";

intensity = 1;

interval = 1;

};

class DamageAround1 {

simulation = "damageAround";

type = "DamageAroundHouse";

position = "";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

};

class APLION_Housebase : APLION_Base_Object {

scope = 1;

model = "";

icon = "";

displayName = "";

animated = 1;

vehicleClass = "APLION_BuildingsVehicleClass";

nameSound = "house";

accuracy = 0.2;

typicalCargo[] = {};

transportAmmo = 0;

transportRepair = 0;

transportFuel = 0;

mapSize = 11;

cost = 0;

armor = 800;

/*extern*/ class DestructionEffects;

};

class Land_build2: APLION_Housebase {

model = "APLION_buildings\Build1\build2.p3d";

displayName = "Diorofo #1";

nameSound = "";

mapSize = 8;

icon = "iconStaticObject";

accuracy = 1000;

armor = 200;

position = "vertical";

destrType = "DestructBuilding";

scope = 2;

class DestructionEffects : DestructionEffects

{

class Ruin1

{

simulation = "ruin";

type = "ca\structures\ruins\ruin_01";

position = "Dampos";

intensity = 1;

interval = 1;

lifeTime = 1;

};

class Dust {

simulation = "particles";

type = "ExploRocks";

position = "piece_1";

intensity = 0.1;

interval = 0.01;

lifeTime = 0.01;

size = 5;

};

class Dust2 : Dust {

simulation = "particles";

type = "ExploRocks";

position = "piece_1";

intensity = 0.1;

interval = 0.01;

lifeTime = 0.01;

size = 3;

};

};

class Hitglass

{

armor = 0.0005;

material = -1;

name = "tzamia";

visual = "";

passThrough = 0;

convexComponent = "tzamia";

};

class AnimationSources {

class door_button1 {

source = "user";

animPeriod = 1.5;

initPhase = 0;

};

class door_button2 {

source = "user";

animPeriod = 1.5;

initPhase = 0;

};

};

class UserActions

{

class Open_door

{

displayName="Open Door";

onlyforplayer = 0;

position="door_button1";

radius=2;

condition="this animationPhase ""door_button1"" < 0.5";

statement="this animate [""door_button1"", 1]";

};

class Close_Door : Open_door

{

displayName="Close Door";

condition="this animationPhase ""door_button1"" >= 0.5";

statement="this animate [""door_button1"", 0]";

};

class Open_door2

{

displayName="Open Door";

onlyforplayer = 0;

position="door_button2";

radius=2;

condition="this animationPhase ""door_button2"" < 0.5";

statement="this animate [""door_button2"", 1]";

};

class Close_Door2 : Open_door2

{

displayName="Close Door";

condition="this animationPhase ""door_button2"" >= 0.5";

statement="this animate [""door_button2"", 0]";

};

};

};

};

... first of all ... not much changed regarding dust effects ... and ... even if I have placed a memory point (in my memory lod into the center of the building) ... the ruins model is still outplaced (original position).

Can you please check my config above for errors ?

Thanks for your efforts so far mate.

Share this post


Link to post
Share on other sites

i make an example mate its easier for me i think , wont be long maybe 30 mins just simple block.

I plat TOH these days but amra2 still around somewhere ;)

Share this post


Link to post
Share on other sites
i make an example mate its easier for me i think , wont be long maybe 30 mins just simple block.

I plat TOH these days but amra2 still around somewhere ;)

Mate, really, highly appreciate your help ... I'll be waiting as long as needed for this example ... thanks a lot in advance.

Share this post


Link to post
Share on other sites
No problem ,

well small one , slight delay because of RL , will be more like 3 hours sorry

i started it though will get it right by tonight ;)

meanwhile i saw this have a read also

http://community.bistudio.com/wiki/Building_Configs

and

http://community.bistudio.com/wiki/Mondkalb%27s_Addon_Tutorial

Yes I've already seen these mate and my config I believe is based on these two links ... but my building questions are slightly different I think so I'll be waiting for your example :)

Please also note that I'm not using a custom ruin model but one from BIS defaults.

Edited by Aplion

Share this post


Link to post
Share on other sites

hmm if your using a bis ruin then maybe it is offset for original building purpose, for this you will have to move your memory dampos to compensate so it will become in right place .

here is file mate

3 very smal building

house 1 is smoke as i put before

house 2 last a little longer , as you can see i have altered intensity and lifetime in config of house2

house 3 more so

im sure there is little mistake but ask any questions.

will be in empty/thromp_houses/ 1 and 2 ,3

took me longer to find a host that didnt take 3 hours to verify :(

file

http://www.sendspace.com/file/3w7mca

Edited by Thromp
updated link

Share this post


Link to post
Share on other sites

Thromp thanks a lot mate and sorry for late reply ... I'll make some tests and I'll come back with results.

---------- Post added at 12:35 ---------- Previous post was at 11:53 ----------

ok I've made some tests and now I have the smoke I want so thank you very much again Thromp ... but regardless any movement I've made to the Dampos memory point in order to compensate the offset position of the ruins model, nothing changed ... is there any change to be locked in position somehow by default ?

Also if its possible I would like to ask a way (except smoke) to produce some fire upon building destruction ... is it possible ?

Share this post


Link to post
Share on other sites

Well problems are never end ... as I said thanks to Thromp I have the amount of smoke destruction effect I want ... so I decided to build my own ruin instead using one of BIS defaults ...

I made the p3d and according (at least I believe) Thromp example I've tried to make it work ... but no !! ... my ruin model is not showing when my building falling down !! ... I can't figured out what I'm doing wrong so for one more time I'm giving the config I use ...

class CfgPatches {

class APLION_Buildings {

units[] = {};

weapons[] = {};

requiredVersion = 1.0;

requiredAddons[] = {"CABuildings","CABuildings2","CAData"};

};

};

class CfgVehicleClasses {

class APLION_BuildingsRuinsClass {

displayName = "Aplion Ruins";

};

class APLION_BuildingsVehicleClass {

displayName = "ApLion Houses ";

};

};

class CfgVehicles {

class HouseBase;

class House: HouseBase

{

class DestructionEffects;

};

class All;

class Ruins;

class Land_build2_ruin: Ruins {

scope = protected;

vehicleClass = "Ruins";

model = "APLION_buildings\build1\ruins\build2_ruin";

displayName = "MyRuins1";

};

class APLION_Base_Object : House {

scope = 0;

side = 3;

icon = "iconStaticObject";

nameSound = "object";

simulation = "house";

picture = "pictureStaticObject";

model="";

sound = "Building";

placement = "vertical";

ladders[] = {};

vehicleClass = "";

displayName = "";

coefInside = 1;

coefInsideHeur = 0.25;

mapSize = 7.5;

animated = 1;

armor = 300;

destrType = "DestructBuilding";

damageResistance = 0.004;

class DestructionEffects {

class Smoke1

{

simulation = "particles";

type = "HouseDestructionSmoke";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 0.10;

};

class Smoke2 : Smoke1

{

type = "HouseDestructionSmoke2";

};

class Smoke3 : Smoke1

{

type = "HouseDestructionSmoke3";

};

class Smoke4 : Smoke1

{

type = "HouseDestructionSmoke4";

};

class Smoke5 : Smoke1

{

type = "HouseDestrSmokeLong";

};

class DestroyPhase1 {

simulation = "destroy";

type = "DelayedDestruction";

lifeTime = 0.5;

position = "";

intensity = 1;

interval = 1;

};

class DamageAround1 {

simulation = "damageAround";

type = "DamageAroundHouse";

position = "";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

};

class APLION_Housebase : APLION_Base_Object {

scope = 1;

model = "";

icon = "";

displayName = "";

animated = 1;

vehicleClass = "APLION_BuildingsVehicleClass";

nameSound = "house";

accuracy = 0.2;

typicalCargo[] = {};

transportAmmo = 0;

transportRepair = 0;

transportFuel = 0;

mapSize = 11;

cost = 0;

armor = 800;

/*extern*/ class DestructionEffects;

};

class Land_build2: APLION_Housebase {

model = "APLION_buildings\Build1\build2.p3d";

displayName = "Diorofo #1";

nameSound = "";

mapSize = 8;

icon = "iconStaticObject";

accuracy = 1000;

armor = 200;

position = "vertical";

destrType = "DestructBuilding";

scope = 2;

class DestructionEffects : DestructionEffects

{

class Ruin1

{

simulation = "ruin";

/*type = "ca\structures\ruins\ruin_01"; */

type = "APLION_buildings\build1\ruins\build2_ruin";

position = "Dampos";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

class Hitglass

{

armor = 0.0005;

material = -1;

name = "tzamia";

visual = "";

passThrough = 0;

convexComponent = "tzamia";

};

class AnimationSources {

class door_button1 {

source = "user";

animPeriod = 1.5;

initPhase = 0;

};

class door_button2 {

source = "user";

animPeriod = 1.5;

initPhase = 0;

};

};

class UserActions

{

class Open_door

{

displayName="Open Door";

onlyforplayer = 0;

position="door_button1";

radius=2;

condition="this animationPhase ""door_button1"" < 0.5";

statement="this animate [""door_button1"", 1]";

};

class Close_Door : Open_door

{

displayName="Close Door";

condition="this animationPhase ""door_button1"" >= 0.5";

statement="this animate [""door_button1"", 0]";

};

class Open_door2

{

displayName="Open Door";

onlyforplayer = 0;

position="door_button2";

radius=2;

condition="this animationPhase ""door_button2"" < 0.5";

statement="this animate [""door_button2"", 1]";

};

class Close_Door2 : Open_door2

{

displayName="Close Door";

condition="this animationPhase ""door_button2"" >= 0.5";

statement="this animate [""door_button2"", 0]";

};

};

};

};

Share this post


Link to post
Share on other sites

you can simply use my config if you wish and rename apilon

look in arma.rpt it will show you exact erro , it might just be simple path error mate

Share this post


Link to post
Share on other sites

But Thromp have a better look ...

I have already defined ...

class Ruins;

class Land_build2_ruin: Ruins {

scope = protected;

vehicleClass = "Ruins";

model = "APLION_buildings\build1\ruins\build2_ruin";

displayName = "MyRuins1";

};

and after that in my model ...

class DestructionEffects : DestructionEffects

{

class Ruin1

{

simulation = "ruin";

/*type = "ca\structures\ruins\ruin_01"; */

type = "APLION_buildings\build1\ruins\build2_ruin";

position = "Dampos";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

isn't enough ? or I missed something ?

Share this post


Link to post
Share on other sites

sorry mate didnt see on ipad , on pc now :)

check arma.rpt after blow house and then show here what it says

only thing i see is this

class HouseBase;

class House: HouseBase

{

class DestructionEffects;

};

class All; <<<<<<<<<<<<<<<<< hmmm

class Ruins;

class all would come before house so you are maybe changiung inheritance and lose something , wild guess

try like this

class HouseBase; // External class reference

class House : HouseBase {

class DestructionEffects; // External class reference

};

class Ruins; // External class reference

Edited by Thromp

Share this post


Link to post
Share on other sites

Nope ... I have removed the "class All;" but still nothing ....

Share this post


Link to post
Share on other sites

hmmm in baseobject

change

class APLION_Base_Object : House {

scope = 0;

change

to

scope = 1;

also pls put here arma.rpt

Share this post


Link to post
Share on other sites

Because I'm running some more addons at same time it will be difficult to give here the whole RPT ... so I found and giving the error regarding the ruins model (from RPT inside).

Cannot create entity with abstract type Land_build2_ruin (scope = private?)

Cannot create non-ai vehicle Land_build2_ruin,aplion_buildings\build1\ruins\build2_ruin.p3d

Failed ruin creation: type Land_build2_ruin

---------- Post added at 15:28 ---------- Previous post was at 15:22 ----------

hmmm in baseobject

change

change

to

scope = 1;

also pls put here arma.rpt

Nope ... the "scope" value didn't change anything ... unfortunatelly ..

Share this post


Link to post
Share on other sites

hmm try change this

/*extern*/ class DestructionEffects;

to

class DestructionEffects : DestructionEffects {};

or

class DestructionEffects : DestructionEffects

{

class Ruin1

{

simulation = "ruin";

/*type = "ca\structures\ruins\ruin_01"; */

type = "APLION_buildings\build1\ruins\build2_ruin";

position = "Dampos";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

Share this post


Link to post
Share on other sites

but if I'll do this then I'll not have class DestructionEffects defined !!

Sorry I'm not sure that I can understand what and where exactly must change something ... :(

Share this post


Link to post
Share on other sites

:)

well beacuse of this here

class APLION_Housebase : APLION_Base_Object {

scope = 1;

model = "";

icon = "";

displayName = "";

animated = 1;

vehicleClass = "APLION_BuildingsVehicleClass";

nameSound = "house";

accuracy = 0.2;

typicalCargo[] = {};

transportAmmo = 0;

transportRepair = 0;

transportFuel = 0;

mapSize = 11;

cost = 0;

armor = 800;

/*extern*/ class DestructionEffects; <<<<<<<<<<<<<<<<<<<<< here

};

you creating new destructioneffects thats empty when you then do this (i think ) , my example works and its all i can see different you see from my config.

Share this post


Link to post
Share on other sites

Now this is funny ... I've change the class DestructionEffects; with class DestructionEffects {}; .... now I have no errors in RPT but my building is not collapsing anymore !! strange !!

---------- Post added at 16:05 ---------- Previous post was at 15:57 ----------

UPDATE ... YES it worked ... replacing class DestructionEffects; with class DestructionEffects : DestructionEffects {}; as you said ... I have my ruins in place and without any RPT errors !!

Thromp you are a life savier :)

Thanks a lot ... again and again :)

Share this post


Link to post
Share on other sites

well its almost 1 year since i even opend this game so , i also learned something incase i get bored flying Helicopters :)

oh and for fire :

class Sound

{

simulation = "sound";

type = "Fire";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 3;

};

class Fire1

{

simulation = "particles";

type = "ObjectDestructionFire1";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 3;

};

class Fire2

{

simulation = "particles";

type = "ObjectDestructionFire1";

position = "destructionEffect1";

intensity = 0.15;

interval = 1;

lifeTime = 3;

};

but becareful remember original arma LAGGG with destrucion ;) , find happy place if you can

Edited by Thromp

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
Sign in to follow this  

×