Explosive Barrel

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Explosive Barrel

Post by Swaffy »

I know nothing about how to create an eplosive barrel. I can only edit existing files, not create new ones. So if the process of creating an explosive barrel that works means that I have to create new mesh objects or something, I would like someone to create them for me or show me a mod that has working explosive barrel.

Thanks for any given help.
Last edited by Swaffy on Wed Jan 12, 2011 8:16 am, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: Explosive Barrel

Post by tekk »

One of ApacheThunders mods has a exploding barrel on elalamein I recall , i think its DC Unathorized, just youtube it to make sure which one has it.
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
User avatar
Herrmann
Posts: 49
Joined: Mon Sep 20, 2010 2:57 pm

Re: Explosive Barrel

Post by Herrmann »

Explosive Barrel
Do you can find it in the "DC Unauthorisated 3.3" Mod on the "GIZA Map".
I dont know any active mod which using this interesting code.:-)
Its a DCU 3.3 special.
hgklan.plusboard.de
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Explosive Barrel

Post by Apache Thunder »

Well the jist of it is you have to convert what ever object you want destructible into a PCO. Then you have to either modify the object's collision mesh to have a material ID that would respond to projectiles/explosions or you would have to modify the damage system to add the object's current mat ID to be damaged by projectiles.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Explosive Barrel

Post by Swaffy »

Do you mind if I copy yours over to my mod?
I'm the only one who plays my mod.

I thought DCX has one, but I was wrong.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Explosive Barrel

Post by Apache Thunder »

Sure, feel free to use any of my coding and other stuff I had made. :D
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Explosive Barrel

Post by Swaffy »

Thank you sir, I'll check it out.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Explosive Barrel

Post by Swaffy »

What files do I need to gather? This is what I have [Excluding the Green Barrel, as I will only use the Yellow Barrel]:

Objects.rfa
BF2_Objects/Statics/Objects.con
BF2_Objects/Statics/Special/BF2_Barrels
BF2_Objects/Statics/Special/spawners
MOVE_FILES/Stebarrel1/AI/Objects.con
MOVE_FILES/Stebarrel1/Objects.con

StandardMesh.rfa
BF2/Statics/Yellow_Barrel_m1.rs
BF2/Statics/Yellow_Barrel_m1.sm
BF2/Statics/Yellow_Barrel_wreck.rs
BF2/Statics/Yellow_Barrel_wreck.sm

Texture.rfa
BF2/Statics/barell_wreck_s.dds
BF2/Statics/barell_yw_c.dds

That is all I have. What else am I missing for the barrel to work in-game?
Also, what object name do I add when spawning the object on a map? Is it "Stebarrel1"?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Explosive Barrel

Post by Swaffy »

Alright, I have a barrel working in-game on the map. But when I shoot the barrel, it disappears and there is no explosion.

It still pushes vehicles to the side and damages things, but there is no visible explosion or the sound of an explosion.

How can I fix this problem? I reckon it has to do with these two lines?

ObjectTemplate.create PlayerControlObject destructible_BF2_barrel
ObjectTemplate.geometry Yellow_Barrel_M1
ObjectTemplate.networkableInfo BarrelInfo
ObjectTemplate.cullRadiusScale 4.0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.explosionRadius 5

ObjectTemplate.explosionMaterial 205
objectTemplate.criticalDamage 10
ObjectTemplate.hpLostWhileCriticalDamage 0.1
ObjectTemplate.HasArmor 1
ObjectTemplate.HitPoints 25
ObjectTemplate.MaxHitPoints 25

ObjectTemplate.Material 45
ObjectTemplate.timetoliveafterdeath 0.1
ObjectTemplate.addArmorEffect 0 e_ExplGas_tank 0/0/0
ObjectTemplate.addArmorEffect 0 e_BF2Barrel_w 0/2/0
ObjectTemplate.addArmorEffect 0 e_scrapmetal 0/0/0
ObjectTemplate.addArmorEffect 0 e_scrapmetalsmoke 0/0/0
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleIcon "Empty.dds"
ObjectTemplate.setMinimapIcon "Empty.dds"
ObjectTemplate.setPcoId 0
ObjectTemplate.GUIIndex 30
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
motoko
Posts: 217
Joined: Sun Nov 21, 2010 8:43 pm
Location: Dante's 6th Pit of Hell

Re: Explosive Barrel

Post by motoko »

Wouldn't the view of explosion be caused by a different file, say, animation? I wouldn't know, just sayin' as I'm mostly SSM.
Post Reply