Thread: Flashbang gsc?

Results 1 to 8 of 8
  1. #1
    TheMaskedOne's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Home
    Posts
    803
    Reputation
    10
    Thanks
    719
    My Mood
    Yeehaw

    Flashbang gsc?

    is there something as a flashbang.gsc
    cuz i wanne edit the flashbang
    please help

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    maps\mp\_flashgrenades.gsc

    Code:
    main()
    {
    	precacheShellshock("flashbang_mp");
    }
    
    
    startMonitoringFlash()
    {
    	self thread monitorFlash();
    }
    
    
    stopMonitoringFlash(disconnected)
    {
    	self notify("stop_monitoring_flash");
    }
    
    
    flashRumbleLoop( duration )
    {
    	self endon("stop_monitoring_flash");
    	
    	self endon("flash_rumble_loop");
    	self notify("flash_rumble_loop");
    	
    	goalTime = getTime() + duration * 1000;
    	
    	while ( getTime() < goalTime )
    	{
    		self PlayRumbleOnEntity( "damage_heavy" );
    		wait( 0.05 );
    	}
    }
    
    
    monitorFlash()
    {
    	self endon("disconnect");
    	self.flashEndTime = 0;
    	while(1)
    	{
    		self waittill( "flashbang", origin, amount_distance, amount_angle, attacker );
    		
    		if ( !isalive( self ) )
    			continue;
    		
    		if ( isDefined( self.usingRemote ) )
    			continue;
    		
    		hurtattacker = false;
    		hurtvictim = true;
    		
    		if ( amount_angle < 0.5 )
    			amount_angle = 0.5;
    		else if ( amount_angle > 0.8 )
    			amount_angle = 1;
    
    		duration = amount_distance * amount_angle * 6;
    		
    		if ( duration < 0.25 )
    			continue;
    			
    		rumbleduration = undefined;
    		if ( duration > 2 )
    			rumbleduration = 0.75;
    		else
    			rumbleduration = 0.25;
    		
    		assert(isdefined(self.pers["team"]));
    		if (level.teamBased && isdefined(attacker) && isdefined(attacker.pers["team"]) && attacker.pers["team"] == self.pers["team"] && attacker != self)
    		{
    			if(level.friendlyfire == 0) // no FF
    			{
    				continue;
    			}
    			else if(level.friendlyfire == 1) // FF
    			{
    			}
    			else if(level.friendlyfire == 2) // reflect
    			{
    				duration = duration * .5;
    				rumbleduration = rumbleduration * .5;
    				hurtvictim = false;
    				hurtattacker = true;
    			}
    			else if(level.friendlyfire == 3) // share
    			{
    				duration = duration * .5;
    				rumbleduration = rumbleduration * .5;
    				hurtattacker = true;
    			}
    		}
    		else
    		{
    			attacker notify( "flash_hit" );
    		}
    		
    		if (hurtvictim)
    			self thread applyFlash(duration, rumbleduration);
    		if (hurtattacker)
    			attacker thread applyFlash(duration, rumbleduration);
    	}
    }
    
    applyFlash(duration, rumbleduration)
    {
    	// wait for the highest flash duration this frame,
    	// and apply it in the following frame
    	
    	if (!isdefined(self.flashDuration) || duration > self.flashDuration)
    		self.flashDuration = duration;
    	if (!isdefined(self.flashRumbleDuration) || rumbleduration > self.flashRumbleDuration)
    		self.flashRumbleDuration = rumbleduration;
    	
    	wait .05;
    	
    	if (isdefined(self.flashDuration)) {
    		self shellshock( "flashbang_mp", self.flashDuration ); // TODO: avoid shellshock overlap
    		self.flashEndTime = getTime() + (self.flashDuration * 1000);
    	}
    	if (isdefined(self.flashRumbleDuration)) {
    		self thread flashRumbleLoop( self.flashRumbleDuration ); //TODO: Non-hacky rumble.
    	}
    	
    	self.flashDuration = undefined;
    	self.flashRumbleDuration = undefined;
    }
    
    
    isFlashbanged()
    {
    	return isDefined( self.flashEndTime ) && gettime() < self.flashEndTime;
    }

  3. #3
    TechnoX's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Logitech G510.
    Posts
    154
    Reputation
    11
    Thanks
    3
    My Mood
    Yeehaw
    You can find all GSC files here: https://www.mpgh.net/forum/323-call-d...ollection.html or you need to use FF viewer
    I have big mess.

  4. #4
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    Quote Originally Posted by TechnoX View Post
    You can find all GSC files here: https://www.mpgh.net/forum/323-call-d...ollection.html or you need to use FF viewer
    Don't post useless stuff after someone has already posted/solved the problem.

  5. The Following 2 Users Say Thank You to EpicPlayer For This Useful Post:

    pyrozombie (06-26-2011),Yamato (06-26-2011)

  6. #5
    TechnoX's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Logitech G510.
    Posts
    154
    Reputation
    11
    Thanks
    3
    My Mood
    Yeehaw
    Quote Originally Posted by EpicPlayer View Post
    Don't post useless stuff after someone has already posted/solved the problem.
    I think that is just usefull before he is gonna make another thread asking for a gsc file. So i think your post is useless

  7. #6
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    Quote Originally Posted by TechnoX View Post
    he is gonna make another thread asking for a gsc file.
    That's true.

  8. #7
    TheMaskedOne's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Home
    Posts
    803
    Reputation
    10
    Thanks
    719
    My Mood
    Yeehaw
    oke thanks for help annyway i cant find it but now i found it with this post so ty

  9. #8
    Moto's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Bay Area, CA
    Posts
    13,055
    Reputation
    707
    Thanks
    14,558
    My Mood
    Blah
    /closed
    /solved