Results 1 to 2 of 2

Thread: replacing ammo

Hybrid View

  1. #1
    Redeemer
    Join Date
    Dec 2001
    Posts
    1,482

    Default 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
    Last edited by legacy-TseTse; 08-21-2003 at 10:12 PM.

  2. #2
    Redeemer
    Join Date
    Dec 2001
    Posts
    1,482

    Default

    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;
        }


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.