PDA

View Full Version : how to preache smoke grenade effect cod2



bossxxl
9th April 2015, 01:49
i have like smoke_grenade_american_mp in my mod but when i throw the grenade the effect of smoke doesn't come since i changed the effect with another one so i need to know to preache this new effect for the allies


fx/boss/boss_smoke.efx

xmodel/projectile_us_smoke_grenade\projExplosionType\none \projExplosionEffect\fx/boss/boss_smoke.efx

IzNoGoD
9th April 2015, 12:36
smoke grenades are pretty hardcoded into the engine as the engine wraps forward with the smoke efx after a killcam and on connect to assure every player sees exactly the same smoke. This is also the reason smoke grenades dont delete() themselves: they are needed as a reference point for the efx warping.

I have never tried replacing the smoke efx so i cannot help you with that.

Ni3ls
9th April 2015, 13:49
Post your smokegrenade file
I have added this for custom smoke

projExplosionEffect\fx/fire/building_fire_large.efx
Where

fx/fire/building_fire_large.efx is the location of the effect

Tally
9th April 2015, 14:03
The FX used by smoke grenades is engine driven. As long as you DON'T change the name, you can edit the FX and make it longer/shorter, or change its color. However, if you try and use a custom FX with a custom name, it will get ignored by the engine. This is all to do with how the engine handles impacts. They are entirely engine driven and you cannot introduce new ones.

IzNoGoD
9th April 2015, 14:26
The FX used by smoke grenades is engine driven. As long as you DON'T change the name, you can edit the FX and make it longer/shorter, or change its color. However, if you try and use a custom FX with a custom name, it will get ignored by the engine. This is all to do with how the engine handles impacts. They are entirely engine driven and you cannot introduce new ones.

Actual impact fx can be cahnged in iw_impacts.csv located in /fx

bossxxl
9th April 2015, 15:22
in mod extreme v+2.9 he use different smokes and with different name and he preaches it but i didn't know how he do that

IzNoGoD
9th April 2015, 15:35
Disabling killcam will go a long way then. Just change the efx in the weapon file

bossxxl
9th April 2015, 15:35
i didnt know how to use all this to preach only one smoke color


loadSmokeFX(colour)
{
switch(colour)
{
case "_blue_": level.ex_effect["bluesmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/blue_main.efx"); break;
case "_green_": level.ex_effect["greensmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/green_main.efx"); break;
case "_orange_": level.ex_effect["orangesmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/orange_main.efx"); break;
case "_pink_": level.ex_effect["pinksmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/pink_main.efx"); break;
case "_red_": level.ex_effect["redsmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/red_main.efx"); break;
case "_yellow_": level.ex_effect["yellowsmoke"] = [[level.ex_PrecacheEffect]]("fx/extreme_smoke/yellow_main.efx"); break;
default: level.ex_effect["greysmoke"] = [[level.ex_PrecacheEffect]]("fx/props/american_smoke_grenade.efx"); break;
}
}




loadSmokeFX(extreme\_ex_weapons::getSmokeColour(le vel.ex_smoke[game["allies"]]));




getSmokeColour(num)
{
switch(num)
{
case 1: return "_blue_";
case 2: return "_green_";
case 3: return "_orange_";
case 4: return "_pink_";
case 5: return "_red_";
case 6: return "_yellow_";
case 7: return "_fire_";
case 8: return "_gas_";
case 9: return "_satchel_";
case 0:
default: return "_";
}
}




getSmokeTypeAllies()
{
smoketype = "smoke_grenade_" + game["allies"] + getSmokeColour(level.ex_smoke[game["allies"]]) + "mp";
return smoketype;
}



smokegrenadetype_allies = getSmokeTypeAllies();

Tally
9th April 2015, 15:45
Actual impact fx can be cahnged in iw_impacts.csv located in /fx

You can't change the name of the FX. Or the location. Which is what I just got through saying.

Sometimes I wonder why I bother to post.

bossxxl
9th April 2015, 15:50
but in extreme they changed it and they preached it XD

YuriJurek
9th April 2015, 15:54
And this is why I don't bother at all.

Tally
9th April 2015, 15:54
but in extreme they changed it and they preached it XD

2 different conversations going on here - you can't change the name of the STOCK FX. You can introduce your own FX by deleting the smoke grenade before it runs its STOCK FX and run your own custom FX on the orign of the deleted grenade, which is what I believe the eXtreme+ mod does. At least, that is how I do it.

BTW - please DO NOT post smilies. We all know what they are, they have been around for at least 20 years now. As such, showing you can do smilies is lame. Do not do it. It is unoriginal.

bossxxl
10th April 2015, 00:31
i guess this is the one im looking for ^^ i tried all of ur sugestion and the smooke doesnt come out ^^


level._effect["american_smoke_grenade"] = loadfx ("fx/props/american_smoke_grenade.efx");

IzNoGoD
10th April 2015, 00:33
You can change the efx in the weaponfile, but the engine will hardcoded warp the original named fx after killcam.

bossxxl
10th April 2015, 11:16
what mean hard cored it after killcam ?? i just need solution to make the effects work for my mod smoke grenade because im not using tdm or dm im using bzmod

IzNoGoD
10th April 2015, 11:53
what mean hard cored it after killcam ?? i just need solution to make the effects work for my mod smoke grenade because im not using tdm or dm im using bzmod

Just either 1) edit the weaponfile to reference a different efx or 2) edit the original efx.

Either way, after the killcam, the original efx will be warped (try replacing the original with a red one, while editting the weaponfile with a blue one. After the killcam, the effect by the smoke will be red instead of the blue it was prior to the killcam)