Jump to content
Official BF Editor Forums

How To Make A Destroyable Objects


FailureOne
 Share

Recommended Posts

They look very much like bf4 buildings, to be your "own". :unsure:

In bf2 we are quite limited to how you can do destroyable buildings, we cant do like how you see in modern games where you make a mesh then set where and how to break it in the engine/editor, its just done with a second destroyed building object and swapped meshes through code on destruction, with a some effects in-between. Which in this case I imagine with such a large building isn't going to look very nice. But to start make a new model of it destroyed, and I'm sure someone can give you the info on the coding which isn't my line of work :)

Link to comment
Share on other sites

In bf2 we are quite limited to how you can do destroyable buildings, we cant do like how you see in modern games where you make a mesh then set where and how to break it in the engine/editor, its just done with a second destroyed building object and swapped meshes through code on destruction, with a some effects in-between. Which in this case I imagine with such a large building isn't going to look very nice. But to start make a new model of it destroyed, and I'm sure someone can give you the info on the coding which isn't my line of work :)/>

Yupss, I'd made it but my custom particle didn't show up

This is my custom effect :

rem *** Generated with Bf2Editor.exe [created: 2005/4/4 13:40]

ObjectTemplate.activeSafe EffectBundle e_building_hancur

ObjectTemplate.modifiedByUser dsu

ObjectTemplate.saveInSeparateFile 1

ObjectTemplate.createdInEditor 1

ObjectTemplate.hasMobilePhysics 0

rem -------------------------------------

ObjectTemplate.addTemplate S_e_building_hancur_Start

ObjectTemplate.addTemplate em_building_hancur_fireFlame

ObjectTemplate.addTemplate em_building_hancur_wreck1

ObjectTemplate.addTemplate em_building_hancur_smoke

rem -------------------------------------

ObjectTemplate.setStartOnEffects 0

ObjectTemplate.setStopOnEffects 0

ObjectTemplate.timeToLive CRD_NONE/-1/0/0

ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0

ObjectTemplate.startAtCreation 0

ObjectTemplate.speedFromPhysics 0

ObjectTemplate.activeSafe Sound S_e_building_hancur_Start

ObjectTemplate.modifiedByUser dsu

ObjectTemplate.soundFilename "objects/effects/sounds/barrel/tunna_explode_01.wav,objects/effects/sounds/barrel/tunna_explode_02.wav,objects/effects/sounds/barrel/tunna_explode_03.wav"

ObjectTemplate.loopCount 1

ObjectTemplate.is3dSound 1

ObjectTemplate.stopType 1

ObjectTemplate.volume 1

ObjectTemplate.pitch 1

ObjectTemplate.reverbLevel 1

ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.9/1.1/

ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0/0.95/1/

ObjectTemplate.minDistance 15

ObjectTemplate.halfVolumeDistance 40

ObjectTemplate.create SpriteParticleSystem em_building_hancur_fireFlame

ObjectTemplate.modifiedByUser dsu

ObjectTemplate.createdInEditor 1

ObjectTemplate.showInFirstPerson 1

ObjectTemplate.showInThirdPerson 1

ObjectTemplate.emitPrio High

ObjectTemplate.lodDistance High

ObjectTemplate.qualityLevel Low

ObjectTemplate.emitterType Standard

ObjectTemplate.isLocalSystem 0

ObjectTemplate.emitRadius 0.2/0/0.2

ObjectTemplate.emitRangeX CRD_NONE/0/0/0

ObjectTemplate.emitRangeY CRD_NONE/0/0/0

ObjectTemplate.emitRangeZ CRD_NONE/0/0/0

ObjectTemplate.randomRadialDirection 360

ObjectTemplate.radialDirection 0

ObjectTemplate.emitFrequency 22

ObjectTemplate.preWarmTime 0.15

ObjectTemplate.emitTime 0.3

ObjectTemplate.emitDelay 0

ObjectTemplate.isLooping 0

ObjectTemplate.emitSpeed 9

ObjectTemplate.emitDirection 0/1/0

ObjectTemplate.timeToLive 0.8

ObjectTemplate.randomTimeToLive 0.1

ObjectTemplate.windAffectionFactor 0

ObjectTemplate.forceToWaterSurface 0

ObjectTemplate.waterSurfaceOffset 0.03

ObjectTemplate.rotationGraph 0/-0.28/-0.14/1

ObjectTemplate.alignRotationToSpeed 0

ObjectTemplate.transparencyGraph -0.5/-0.1/-0.4/1

ObjectTemplate.gravity -6

ObjectTemplate.gravityGraph 0/0/0/1

ObjectTemplate.airResistanceGraph 0/0/0/1

ObjectTemplate.emitSpeedGraph 0/0/-0.8/1

ObjectTemplate.randomSpeed 1

ObjectTemplate.randomDirectionAngle 10/10/10

ObjectTemplate.airResistance 0.4

ObjectTemplate.collisionEnable 0

ObjectTemplate.collisionSpeedAlongNormal 0.7

ObjectTemplate.collisionSpeedAlongPlane 0.8

ObjectTemplate.randomSize 0.5

ObjectTemplate.particleMaxSize 1.7

ObjectTemplate.sizeGraph 0/0.2/0.2/0.6

ObjectTemplate.randomIntensity 0.1

ObjectTemplate.lightMapIntensityOffset 1

ObjectTemplate.color1 1.93726/1.93726/1.70196

ObjectTemplate.color2 1/0.678431/0.356863

ObjectTemplate.colorBlendGraph 0/0/1/0

ObjectTemplate.alphaCull 0.1

ObjectTemplate.particleType Sorted

ObjectTemplate.drawOrder Back

ObjectTemplate.randomRotation 327

ObjectTemplate.randomRotationSpeed 0.2

ObjectTemplate.rotationSpeed 0.4

ObjectTemplate.pivotOffset 0/-1

ObjectTemplate.selfShadowIntensity 1

ObjectTemplate.textureName objects\effects\textures\animated\anim_grenade2

ObjectTemplate.animationEnable 1

ObjectTemplate.animationSpeed 20

ObjectTemplate.animationPlayOnce 1

ObjectTemplate.setAnimationFrameWidthRelative 0.25

ObjectTemplate.setAnimationFrameHeightRelative 0.25

ObjectTemplate.animationRandomizedStartFrame 0

ObjectTemplate.animationFrameCount 16

ObjectTemplate.animationFrameCountX 4

ObjectTemplate.create Emitter em_building_hancur_wreck1

ObjectTemplate.modifiedByUser dsu

ObjectTemplate.createdInEditor 1

ObjectTemplate.floaterMod 0

ObjectTemplate.hasMobilePhysics 0

ObjectTemplate.template p_gedung_hancur1

ObjectTemplate.intensity CRD_NONE/10/0/0

ObjectTemplate.positionalSpeedInDof CRD_UNIFORM/2/-2/0

ObjectTemplate.positionalSpeedInUp CRD_UNIFORM/0/0/0

ObjectTemplate.positionalSpeedInRight CRD_UNIFORM/0/0/0

ObjectTemplate.rotationalSpeedInDof CRD_UNIFORM/0/0/0

ObjectTemplate.rotationalSpeedInUp CRD_NONE/0/0/0

ObjectTemplate.rotationalSpeedInRight CRD_UNIFORM/0/0/0

ObjectTemplate.startRotation CRD_NONE/0/0/0

ObjectTemplate.zRotation CRD_NONE/0/0/0

ObjectTemplate.zRotationSnap 1

ObjectTemplate.create SpriteParticleSystem em_building_hancur_smoke

ObjectTemplate.modifiedByUser dsu

ObjectTemplate.createdInEditor 1

ObjectTemplate.showInFirstPerson 1

ObjectTemplate.showInThirdPerson 1

ObjectTemplate.emitPrio High

ObjectTemplate.lodDistance High

ObjectTemplate.qualityLevel Low

ObjectTemplate.emitterType Standard

ObjectTemplate.isLocalSystem 0

ObjectTemplate.emitRadius 1/0/1

ObjectTemplate.emitRangeX CRD_NONE/0/0/0

ObjectTemplate.emitRangeY CRD_NONE/0/0/0

ObjectTemplate.emitRangeZ CRD_NONE/0/0/0

ObjectTemplate.randomRadialDirection 360

ObjectTemplate.radialDirection 0

ObjectTemplate.emitFrequency 30

ObjectTemplate.preWarmTime 0

ObjectTemplate.emitTime 0.1

ObjectTemplate.emitDelay 0

ObjectTemplate.isLooping 0

ObjectTemplate.emitSpeed 3

ObjectTemplate.emitDirection 0/1/0

ObjectTemplate.timeToLive 1.25

ObjectTemplate.randomTimeToLive 0.25

ObjectTemplate.windAffectionFactor 0

ObjectTemplate.forceToWaterSurface 0

ObjectTemplate.waterSurfaceOffset 0.03

ObjectTemplate.rotationGraph 0/0/0/1

ObjectTemplate.alignRotationToSpeed 0

ObjectTemplate.transparencyGraph -3.3/1.6/0.7/1

ObjectTemplate.gravity 0.3

ObjectTemplate.gravityGraph 0/0/0/1

ObjectTemplate.airResistanceGraph 0/0/0/1

ObjectTemplate.emitSpeedGraph 0/0/-0.8/1

ObjectTemplate.randomSpeed 0

ObjectTemplate.randomDirectionAngle 45/0/45

ObjectTemplate.airResistance 0.5

ObjectTemplate.collisionEnable 0

ObjectTemplate.collisionSpeedAlongNormal 0.7

ObjectTemplate.collisionSpeedAlongPlane 0.8

ObjectTemplate.randomSize 0

ObjectTemplate.particleMaxSize 2

ObjectTemplate.sizeGraph 0/0/0.4/0.6

ObjectTemplate.randomIntensity 0.05

ObjectTemplate.lightMapIntensityOffset 0.7

ObjectTemplate.color1 0.117647/0.117647/0.117647

ObjectTemplate.color2 0.227451/0.227451/0.227451

ObjectTemplate.colorBlendGraph 0/0/1/0

ObjectTemplate.alphaCull 0.2

ObjectTemplate.particleType Sorted

ObjectTemplate.drawOrder Back

ObjectTemplate.randomRotation 360

ObjectTemplate.randomRotationSpeed 0.05

ObjectTemplate.rotationSpeed 0.25

ObjectTemplate.pivotOffset 0/0

ObjectTemplate.selfShadowIntensity 1

ObjectTemplate.textureName objects\effects\textures\animated\Anim_smoke

ObjectTemplate.animationEnable 1

ObjectTemplate.animationSpeed 2

ObjectTemplate.animationPlayOnce 0

ObjectTemplate.setAnimationFrameWidthRelative 0.5

ObjectTemplate.setAnimationFrameHeightRelative 0.5

ObjectTemplate.animationRandomizedStartFrame 1

ObjectTemplate.animationFrameCount 4

ObjectTemplate.animationFrameCountX 2

And this is my particle code

rem *** Generated with Bf2Editor.exe [created: 2006/5/15 11:52]

ObjectTemplate.activeSafe Particle p_gedung_hancur1

ObjectTemplate.creator NGO-1:ngo

ObjectTemplate.modifiedByUser "Zentarus111"

ObjectTemplate.saveInSeparateFile 1

ObjectTemplate.geometry gedung70l_wreck

ObjectTemplate.usedOnTransparentSurface 0

ObjectTemplate.collisionMesh gedung70l_wreck

ObjectTemplate.mapMaterial 0 metal_thin 1000

ObjectTemplate.collisionGroups 60

ObjectTemplate.mass 200

ObjectTemplate.hasMobilePhysics 1

ObjectTemplate.physicsType Mesh

ObjectTemplate.hasCollisionPhysics 1

ObjectTemplate.timeToLive CRD_UNIFORM/120/4/0

ObjectTemplate.sizeModifier 1/1/1

ObjectTemplate.transparencyGraph 0/0/0/1

ObjectTemplate.transparency CRD_NONE/0/0/0

This is that picture

1491363_742153839131437_1061870823_o.jpg

Link to comment
Share on other sites

Did you add the effect to the armor component of the destroyable?

for examples look at any object in objects/staticobjects/common/destroyableobjects/

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 50
ObjectTemplate.armor.hitPoints 50
ObjectTemplate.armor.defaultMaterial 97
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionForce 7
ObjectTemplate.armor.explosionDamage 250
ObjectTemplate.armor.explosionRadius 5
ObjectTemplate.armor.explosionMaterial 70
ObjectTemplate.armor.wreckExplosionMaterial 70
ObjectTemplate.armor.wreckHitPoints 50
ObjectTemplate.armor.timeToStayAsWreck 50
ObjectTemplate.armor.timeToStayAfterDestroyed 30
ObjectTemplate.armor.addArmorEffect 0 e_exp_fuel 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 0 e_vexp_tank_2nd 0/0.5/0 0/0/0
rem ---EndComp ---

Also, how big is your effect? The building is huge and the effect could be playing back inside the object's geom1/wreck mesh.

Link to comment
Share on other sites

Did you add the effect to the armor component of the destroyable?

for examples look at any object in objects/staticobjects/common/destroyableobjects/

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 50
ObjectTemplate.armor.hitPoints 50
ObjectTemplate.armor.defaultMaterial 97
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionForce 7
ObjectTemplate.armor.explosionDamage 250
ObjectTemplate.armor.explosionRadius 5
ObjectTemplate.armor.explosionMaterial 70
ObjectTemplate.armor.wreckExplosionMaterial 70
ObjectTemplate.armor.wreckHitPoints 50
ObjectTemplate.armor.timeToStayAsWreck 50
ObjectTemplate.armor.timeToStayAfterDestroyed 30
ObjectTemplate.armor.addArmorEffect 0 e_exp_fuel 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 0 e_vexp_tank_2nd 0/0.5/0 0/0/0
rem ---EndComp ---

Also, how big is your effect? The building is huge and the effect could be playing back inside the object's geom1/wreck mesh.

Thanks guys. It fix now. I just forgot to add this code

ObjectTemplate.armor.explosionForce 12
ObjectTemplate.armor.explosionDamage 150
ObjectTemplate.armor.explosionRadius 9
ObjectTemplate.armor.explosionMaterial 56

Now I'm playing with explosion effect. Hopely I can make a better effect for it since I made a few huge building :rolleyes:

I'll post it when it's done :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...