Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: how to preache smoke grenade effect cod2

  1. #1
    Private
    Join Date
    Jul 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to preache smoke grenade effect cod2

    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
    PHP Code:
    fx/boss/boss_smoke.efx

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

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    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.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Post your smokegrenade file
    I have added this for custom smoke
    Code:
    projExplosionEffect\fx/fire/building_fire_large.efx
    Where
    Code:
    fx/fire/building_fire_large.efx
    is the location of the effect

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    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.
    Last edited by Tally; 9th April 2015 at 14:05.

  5. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by Tally View Post
    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
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  6. #6
    Private
    Join Date
    Jul 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  7. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Disabling killcam will go a long way then. Just change the efx in the weapon file
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. #8
    Private
    Join Date
    Jul 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i didnt know how to use all this to preach only one smoke color

    PHP Code:
    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;
        }

    PHP Code:
    loadSmokeFX(extreme\_ex_weapons::getSmokeColour(level.ex_smoke[game["allies"]])); 


    PHP Code:
    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 
    "_";
        }

    PHP Code:
    getSmokeTypeAllies()
    {
        
    smoketype "smoke_grenade_" game["allies"] + getSmokeColour(level.ex_smoke[game["allies"]]) + "mp";
        return 
    smoketype;

    PHP Code:
    smokegrenadetype_allies getSmokeTypeAllies(); 

  9. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by IzNoGoD View Post
    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.

  10. #10
    Private
    Join Date
    Jul 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but in extreme they changed it and they preached it XD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •