Check Replacement code for ammo...

  • 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.

Gnam

Member
Feb 13, 2002
515
0
16
40
Yes, please.
I wanna do a code like this:
Code:
if ( xWeaponBase(Other) != None )
    {
		for ( i=0; i<8; i++ )
			if ( xWeaponBase(Other).WeaponType == OriginalClasses[i] )
			{
				xWeaponBase(Other).WeaponType = ReplacementClasses[i];
				return true;
			}
...except I want to replace ammo instead of weapons. I assume it works exactly the same except I need the right class for ammo types. In other words, I assume I can just replace 'xWeaponBase' with 'xAmmoPickup' or something like that, but I need to know the right word. Also, is there a way to do this for weapon lockers as well? It would save me a lot of room in my uc files.
 

EvilDrWong

Every line of code elevates you
Jun 16, 2001
932
0
0
40
Inside the machine
Visit site
Ammo should be the most base class for ammunition pickups, or UTAmmoPickup if you prefer as UTAmmoPickup is the only child of Ammo... No idea why thats the case, but i suppose UTAmmoPickup is easier to identify with than the generically named "Ammo." ;)

Kangus should be able to shed a bit of light on screwing with weaponlockers
 

Gnam

Member
Feb 13, 2002
515
0
16
40
Yes, please.
hmm... I think I may have tried 'UTAmmoPickup' and it seemed to not work, I will try it again though to double check.

If UTAmmoPickup is to replace 'XWeaponBase' then what do I use to replace 'WeaponType'? Will 'AmmoType' work?

Also, is there a way to make weapon lockers yield double the ammo they're supposed to? I want to make regular weapon pickups hold a small amount of ammo since there's allways extra ammo sitting right next to them, but then have the lockers yield more, since in ONS there's almost no ammo boxes.
 
Last edited: