• Announcements

    • Detrux

      Site Relaunched   10/13/2016

      Welcome back to BFEditor.org! We've upgraded the forum software, removed the spammers, and improved security. Apologies for the downtime! Det
Sign in to follow this  
Followers 0
JONES

Ground Material And Muzzleflash Effected Dust Blow When Firing A Machinegun While Lying On The Ground

10 posts in this topic

Hello guys!

Does someone know how to get a dust "blow up" effect working that is effected by the machinegun muzzleflash when firing while lying on the ground, also how can i make the effect to only apear on the ground, is ther a way to trigger this combined with a firing weapon?

I appreciate every help i can get, also might someone know if it was already done in a mod? That would make things even easyer with a existing code to work with :)

Share this post


Link to post
Share on other sites

I'll give it a try. Could you show me a vid or pic how it is supposed to look?

Hey thanks man, it should look like this as you can see on the following video.

Look at the dusty ground infront of the barrel when he is firing, the muzzle flash is blowing the dust on the ground away :)

Edited by JONES

Share this post


Link to post
Share on other sites

Would be cool to have this one. :lol:

If anybody would figure that out, then i'll make the same thing as a part of a rocket launcher's backblast :P

Share this post


Link to post
Share on other sites

Is this what you want?

I know the effect isn't good but you get the idea :)

Man thats perfect :o didnt expect you to be so fast, thank you very much for your help, i guess with a different effect it is exactly what i need, i think i can tweak the rest myself with your base tweaks, it only needs to be a tat less smoke i think :)

Can you send me the nessesary tweak files for the effect via pm?

Again thanks for the help, i want to use this in my mod (click signature) of corse i credit you for helping me if you wish!

Edited by JONES

Share this post


Link to post
Share on other sites

How it works:

I used the same technique as DICE on the tank's "smoke-shockwave" when fireing.

Therefore I copied the original material "gebMat_groundEffect" (ID 66) to a new Material e.g. "gebMat_MuzzleGroundEffect" (ID 114)

And set the material Effects to my custom Effect "e_MuzzleGroundEffect"

Then we need a "GroundEffectBundle" which triggers the material effect:

Con:

ObjectTemplate.create GroundEffectBundle geb_muzzleGroundEffect 
ObjectTemplate.createdInEditor 1  
include geb_muzzleGroundEffect.tweak

Tweak:

rem *** Generated with Bf2Editor.exe [created: 2006/5/15 11:52]
ObjectTemplate.activeSafe GroundEffectBundle geb_muzzleGroundEffect
ObjectTemplate.modifiedByUser "Cassio"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.material 114
ObjectTemplate.maxTriggerDistance 0.5

"ObjectTemplate.material 114" is the new material I created.

"ObjectTemplate.maxTriggerDistance 0.5" sets the distance of the GEB from ground where the effect is triggered. If the GEB is placed higher than 0.5 meters from ground in this case no effect is triggered.

The Effect can be any EffectBundle you like.

I used a modified "e_geb_tank_generic" -> "e_MuzzleGroundEffect"

At last the GEB has to be added to a weapon:

...
ObjectTemplate.geometry USLMG_M249SAW
ObjectTemplate.setCollisionMesh uslmg_m249saw
ObjectTemplate.mapMaterial 0 Collision_Material 68
ObjectTemplate.mapMaterial 1 lambert1 68
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.aiTemplate uslmg_m249sawAI
rem -------------------------------------
...
ObjectTemplate.setPosition 0.0106914/0.0652283/-0.109307
ObjectTemplate.addTemplate S_uslmg_m249saw_Zoom
ObjectTemplate.setPosition 0/0.0945407/-0.0520584
ObjectTemplate.addTemplate e_muzz_m4
ObjectTemplate.setPosition 0/0.0720902/0.571102
ObjectTemplate.addTemplate e_shellejection_m249
ObjectTemplate.setPosition 0.0300354/0.0834186/-0.00208129
ObjectTemplate.addTemplate geb_muzzleGroundEffect
rem -------------------------------------
...

The GEB MUST be at the origin 0/0/0 or else it isn't shown. So edit your emitter's position accordingly.

Edited by Cassio

Share this post


Link to post
Share on other sites

Thanks very much for the help and the detailed explanation for this effect :)

Edited by JONES

Share this post


Link to post
Share on other sites

Made some nice groundmuzzle effects, but it doesn't play if its set to a specifict material!!! Wtf is this? It only plays if its set to default material with an attached effect.

This means, that everyone that wanna try this have to deal with the fact that only one effect will play on ALL materials.

Why is this?? Cause every other effects can be attached to certain materials. Lets take bullethits, explosions and other effects. Why dont they need to get assigned as default? Or assiged as default, but also assign to specific other materials, like sand, dirt, gravel, conrete, tarmac...

Is this hardcoded, cause I don't find the logic in this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0