1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Flak Shell Question

Discussion in 'Ask a Coder' started by Gnam, Jun 29, 2004.

  1. Gnam

    Gnam Member

    Joined:
    Feb 13, 2002
    Messages:
    515
    Likes Received:
    0
    Does anyone know what value in UT2004 controls how many flak chunks a shell (alt fire) releases on explosion? I would like to increase it.
     
  2. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    I think it's the 6 in the for loop in this function:
    Code:
    simulated function Explode(vector HitLocation, vector HitNormal)
    {
    	local vector start;
    	local rotator rot;
    	local int i;
    	local FlakChunk NewChunk;
    
    	start = Location + 10 * HitNormal;
    	if ( Role == ROLE_Authority )
    	{
    		HurtRadius(damage, 220, MyDamageType, MomentumTransfer, HitLocation);	
    		for (i=0; i<6; i++)
    		{
    			rot = Rotation;
    			rot.yaw += FRand()*32000-16000;
    			rot.pitch += FRand()*32000-16000;
    			rot.roll += FRand()*32000-16000;
    			NewChunk = Spawn( class 'FlakChunk',, '', Start, rot);
    		}
    	}
    	Destroy();
    }
    
     
  3. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    If you look at the code, it counts from 0 and ends before 6

    0 is the first chunk
    1 is the second
    etc
    5 is the last one, making 6 chunks.

    I<6, change that 6 to the number highter of chunks you one. One weapon Im messing with right now is using 25 chunks.
     
  4. Gnam

    Gnam Member

    Joined:
    Feb 13, 2002
    Messages:
    515
    Likes Received:
    0
    Yeah, that's it. I tried it before, but I think I forgot to recompile before I tried to test it, so I thought it didn't work. Thanks.
     
  5. mattyd

    mattyd New Member

    Joined:
    Jul 18, 2008
    Messages:
    23
    Likes Received:
    0
    To make it easy, download the weaponstuff mutator
     

Share This Page