Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 73

Thread: GAS Grenade For COD2 MP

  1. #31
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    Finally I will try look again dm and tdm.gsc maybe have missed something. And we will finish on that, overall it works, it was good day for me, thanks to you
    Last edited by G-Stuff002; 21st February 2018 at 21:02.

  2. #32
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    After i needed to figure out how to connect gasgrenade to allweapons mod, in order to files do not have conflict. I'll do it later, I still need to edit one function to one weapon, it very hardly but i began to understand a little bit..

  3. #33
    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've reviewed all the files and other code (at least a line) for puke.wav did not find it. This code only in soundaliases/_mc2.csv, codes which needed to be moved to mustardgas.csv

    I do not know what else can move to make the two wav files run. Jet from the vort can be seen but there is no sound
    I'm not clear what you are trying to do, or what the problem is. The stand-alone mod I did for you does not use puke.wav. It only uses puke_1.wav and puke_2.wav. Both of these are handled in the sounalias file under "puker":

    Code:
    #PUKE,,,,,,,,,,,,,,,,,
    puker,1,mustard/puke_1.wav,1,1,,,120,3000,,,voice,streamed,,,,,
    puker,2,mustard/puke_2.wav,1,1,,,120,3000,,,voice,streamed,,,,,
    So, you don't need puke.wav. I'm not even sure where you got that file from, it's not in the merciless mod.

    As far as I'm concerned, the mod works fine. All the sounds play as they should. If you are still having problems, you must have a conflict somewhere in your mod. The skill of a true modder is the ability to figure out where those type of conflicts are, and then solve them.

  4. #34
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    sorry not added "1" in puke.wav when writing here. The problem is that I do not hear in game puke_1.wav and puke_2.wav played

    Repeated many times the throw of a grenade but the sounds do not play

    The player only coughs and breathes hard
    Last edited by G-Stuff002; 21st February 2018 at 21:27.

  5. #35
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    I've been sitting all day with this mod and I'm a little tired, sorry

  6. #36
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Okay, I found the problem - there was a function which needed to be threaded because it lead to a loop.

    Try this instead:

    Code:
    gasPlayer( eAttacker, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime ) 
    { 
    	self endon( "killed_player" );
    	self endon( "disconnect" );
    	
    	len=undefined;
    	if( !isDefined( self.gassed ) ) 
    	{
    		if(iDamage <= 5)
    			len = .25*2;
    		else if(iDamage >=5 && iDamage < 10)
    			len = .45*2;
    		else if(iDamage >= 10 && iDamage < 15)
    			len = .75*2;
    		else if(iDamage >= 15)
    			len = 1*2; //4
    		self shellshock( "mc_mustard", len );
    		
    		self.gassed = 1;
    	}
    	
    	if( !isDefined( self.puked ) && randomint( 100 ) > 70 ) //30% chance to puke
    	{
    		if( !isDefined( self.scr ) )
    		{
    			if( !isDefined( self.scr ) )
    				self scream( "p" );
    				
    			self.puked = 1;
    		}
    		
    		playfxontag( level._effect["puke"], self, "j_Head" );
    		self thread forceto( "crouch" );
    	}
    	else
    	{
    		if( randomint( 100 ) > 70 )
    		{
    			if( !isDefined( self.scr) )
    				self thread scream( "h" );
    		}
    		else
    		{
    			if( !isDefined( self.scr ) )
    				self scream( "mc" );
    		}
    	}
    	
    	if( self.health - iDamage <= 0 )
    		self finishPlayerDamage( eAttacker, eAttacker, 5, iDFlags, sMeansOfDeath, sWeapon, (self.origin + (0,0,-300)), vDir, sHitLoc,psOffsetTime );
    	else
    		self.health = self.health -iDamage;
    	
    	if( isAlive( self ) )
    		self thread waittoDie();
    }
    
    waittoDie()
    {
    	self endon( "disconnect" );
    	
    	self waittill( "killed_player" );
    	
    	self.gassed = undefined; 
    	self.puked = undefined;
    	self.scr = undefined;
    }
    Don't forget the new function waittoDie(), as that undefines some player flags.

  7. The Following 2 Users Say Thank You to Tally For This Useful Post:

    G-Stuff002 (22nd February 2018),kung foo man (21st February 2018)

  8. #37
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    Tally, you're right! I reinstall tommorow cod2, maybe while i work i something change in main folder..

  9. #38
    Private First Class G-Stuff002's Avatar
    Join Date
    Jan 2018
    Posts
    212
    Thanks
    42
    Thanked 109 Times in 107 Posts
    ok

    "as that undefines some player flags" not understand what it that
    Last edited by G-Stuff002; 21st February 2018 at 21:52.

  10. #39
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    PHP Code:
    waittoDie()
    {
        
    self endon"disconnect" );
        
        
    self waittill"killed_player" );
        
        
    self.gassed undefined
        
    self.puked undefined;
        
    self.scr undefined;

    Tally refers to the flags gassed/puked/scr, so other functions can depend on if (isDefined( player.gassed )) e.g.
    timescale 0.01

  11. #40
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Yep, kung fu said it. You have to undefine self.gassed, self.puked, and self.scr (all of these are called "player flags" in COD, or structs if you know programming), otherwise when you die and get gassed again, none of the effects work again.

Posting Permissions

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