Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

replacing ammo

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • replacing ammo

    what's the syntax for searching ammo class?

    something like "ammunition.ProjectileClass"? i could use a tip here

    Code:
        if ( xWeaponBase(Other) != None )
        {
    		if ( xWeaponBase(Other).WeaponType == class'FlakCannon' )
    			xWeaponBase(Other).WeaponType = class'cowboys.QM203';
    		else if ( xWeaponBase(Other).WeaponType == class'RocketLauncher' )
    			xWeaponBase(Other).WeaponType = class'cowboys.cowboyRocketLauncher';
    		else
    			return true;
    	}
    i want to do something similar, replacing one of the ammo types.

    and yea, im a newbie scripter

  • #2
    btw, here's working code i got, thanks to help on 3dbuzz.com forums.

    Code:
        else if ( UTAmmoPickup(Other) != None )
    
        {
             if (string(Other.Class) == "XWeapons.AssaultAmmoPickup")
                 ReplaceWith( Other, "cowboys.QM203GrenadeAmmoPickup");
    
             else if (string(Other.Class) == "XWeapons.FlakAmmoPickup")
                 ReplaceWith( Other, "cowboys.QM203GrenadeAmmoPickup");
    
             else
                 return true;
        }

    Comment

    Working...
    X