Results 1 to 10 of 73

Thread: GAS Grenade For COD2 MP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    I begin to disassemble this mod, its differently have this grenade is no possibility. As an experiment i deleted
    moke_grenade_german_mp2,
    smoke_grenade_german_mp,
    GASGrenadeallies_mp,
    GASGrenadeaxis_mp

    and gas grenede STILL work in game, I think it's in scripts who are responsible for this.

    I look in _weapons.gsc but not find script responsible for function

    This is IWD have all folders and files for grenade but without script for damage
    https://drive.google.com/open?id=1dD...4YFjg1fD2fYGRq

    Spoiler:
    Click image for larger version. 

Name:	1.jpg 
Views:	49 
Size:	136.1 KB 
ID:	1397


    Spoiler:
    Click image for larger version. 

Name:	2.jpg 
Views:	48 
Size:	289.9 KB 
ID:	1398

  2. #2
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    Someone have idea, where i can to look a file for damage function ? Sorry for a maybe stupid question but i not have experience and no one else to ask for help

  3. The Following User Says Thank You to G-Stuff002 For This Useful Post:

    kubislav23 (20th February 2018)

  4. #3
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by G-Stuff002 View Post
    I begin to disassemble this mod, its differently have this grenade is no possibility. As an experiment i deleted
    moke_grenade_german_mp2,
    smoke_grenade_german_mp,
    GASGrenadeallies_mp,
    GASGrenadeaxis_mp

    and gas grenede STILL work in game, I think it's in scripts who are responsible for this.

    I look in _weapons.gsc but not find script responsible for function

    This is IWD have all folders and files for grenade but without script for damage
    https://drive.google.com/open?id=1dD...4YFjg1fD2fYGRq

    Spoiler:
    Click image for larger version. 

Name:	1.jpg 
Views:	49 
Size:	136.1 KB 
ID:	1397


    Spoiler:
    Click image for larger version. 

Name:	2.jpg 
Views:	48 
Size:	289.9 KB 
ID:	1398
    The GSC file that handles mustard gas damage is in _mc2\_mc2_mcFX:

    Allies:

    Code:
    _mc2\_mc2_mcFX::AlliedMonitorMustardGas();
    Code:
    _mc2\_mc2_mcFX::AlliedGasPlayer();
    Axis:

    Code:
    _mc2\_mc2_mcFX::AxisMonitorMustardGas();
    Code:
    _mc2\_mc2_mcFX::AxisGasPlayer();
    There are 2 weapon files:

    Code:
    alliesgas_mp
    Code:
    axisgas_mp
    And both the weapon files use a single FX file:

    Code:
    fx\impacts\mustard_blast.efx
    I've no idea why they have four functions handling the damage. From what I've seen, the only difference between them is the name of the sWeapon. But you can handle that by stipulating the different names based on team:

    Code:
    monitorMustardGas( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
    { 
    	self endon("TimeToDie");
    	self endon("disconnect");
    	//PLAY EFFECT FOR 15 SECONDS 
    	gastime = 10;     
    	for(j = 0;j <= gastime;j++) 
    	{ 
    		//LOOP THROUGH PLAYERS AND DETERMINE WHO IS IN RANGE 
    		players = getentarray("player", "classname"); 
    		for(i=0;i<players.size;i++) 
    		{ 
    			dst = distance(vPoint, players[i].origin); 
    
    			//AREA WHICH PLAYER WILL BE AFFECTED EXPANDS 
    			//ALONG WITH THE GAS/SMOKE (~2ft per sec)
    
    			if( dst > 200 + (j * 20) || players[i].sessionstate != "playing" || !isAlive(players[i]) ) 
    				continue; 
    			//DAMAGE THE PLAYER
    
    			pcnt = 200 + (j * 20);
    			if(dst > pcnt * .75 ) 					// 0-25% dmg
    				iDamage = randomint(5);
    			else if(dst > pcnt * .5 && dst < pcnt * .75) 	// 25-50 % dmg
    				iDamage = 15 + randomint(5);
    			else if(dst > pcnt *.25 && dst < pcnt * .5) 	// 59-75% dmg
    				iDamage = 30 + randomint(5);
    			else if(dst < pcnt * .25)				// 100% dmg
    				iDamage = 45 + randomint(5);
    
    			//vDir = undefined; 
    			//SET THE MOD 
    			sMeansOfDeath = "MOD_UNKNOWN"; 
    			// SET THE WEAPON TO "NONE" SO THE DAMAGE CALLBACK 
    			// DOESNT PICK IT BACK UP AND RESTART THE THREAD 
    			
    			if( eAttacker.pers["team"] == "axis" )
    				sWeapon = "alliedgas_mp";
    			else
    				sWeapon = "axisgas_mp";
    			
    			iDFlags = 1; 
    
    			players[i] thread AlliedGasPlayer(eAttacker, eAttacker, iDamage, iDFlags , sMeansOfDeath , sWeapon, vPoint , undefined,"none",psOffsetTime); 
    		} 
    		wait(1); 
    	}    
    }
    Last edited by Tally; 21st February 2018 at 09:55.

  5. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (21st February 2018)

Posting Permissions

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