PDA

View Full Version : Check Replacement code for ammo...


Gnam
18th Jul 2004, 01:23 PM
I wanna do a code like this:

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
19th Jul 2004, 10:12 PM
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
26th Jul 2004, 11:38 PM
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.