Results 1 to 2 of 2

Thread: replacing ammo

Hybrid View

  1. #1
    legacy-TseTse
    Guest

    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. #2
    legacy-TseTse
    Guest
    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;
        }

Tags for this Thread

Posting Permissions

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