| Home Page | Recent Changes | Preferences

Selethrial/LinkGun

// The Five UC Files of just trying to modify Link Gun Protectiles

// MutXLinkgun.uc
class MutXLinkgun extends Mutator;

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
    local int i;
    local WeaponLocker L;

    bSuperRelevant = 0;

    if ( xWeaponBase(Other) != None )
    {
        if ( string( xWeaponBase(Other).WeaponType ) ~= "XWeapons.Linkgun" )
        {
            xWeaponBase(Other).WeaponType = class'XLinkgun';
            return false;
        }
    }
    else if ( WeaponPickup(Other) != None )
    {
        if ( string(Other.Class) ~= "XWeapons.LinkgunPickup" )
        {
            ReplaceWith( Other, "XLinkgunPickup" );
            return false;
        }
    }
    else if ( WeaponLocker(Other) != None )
    {
        L = WeaponLocker(Other);

        for (i = 0; i < L.Weapons.Length; i++)
        {
            if ( string( L.Weapons[i].WeaponClass ) ~= "XWeapons.Linkgun" )
                L.Weapons[i].WeaponClass = class'XLinkgun';
        }
    }

    return true;
}

//=============================================================================
defaultproperties
{
    GroupName="XLinkGun"
    FriendlyName="Xtreme Link Gun"
    Description="Tweaking the Link Gun"
}

// XLinkGun.ux

class XLinkGun extends Linkgun;

//=============================================================================
defaultproperties
{
    FireModeClass(0)=Class'XLinkgunAltFire'
    PickupClass=Class'XLinkgunPickup'
}

// XLinkgunAltFire.uc

class XLinkgunAltFire extends LinkAltFire;

defaultproperties
{
    ProjectileClass=Class'XLinkProjectile'
}

// XLinkGunPickup.uc

class XLinkgunPickup extends LinkgunPickup;

//=============================================================================
defaultproperties
{
    InventoryType=Class'XLinkGun'
    PickupMessage="You got the Xtreme Linkgun."
}

// XLinkProjectile.uc

class XLinkProjectile extends LinkProjectile;

defaultproperties
{
    Speed=10.00
    MaxSpeed=100.00
    Damage=200.00
}

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In