Reloading tutorial

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

Dark[NSF]

Northwest Secessionalist Forces
Code:
simulated function OutOfAmmo()
{
    if ( !Instigator.IsLocallyControlled() || HasAmmo() )
        return;

    // Auto switch bad!
    //DoAutoSwitch();
}

simulated function Weapon WeaponChange( byte F, bool bSilent )
{
    if ( InventoryGroup == F )
    {
        if ( !HasAmmo() )
        {
                Instigator.ClientMessage( ItemName$MessageNoAmmo );
        }
        else
            return self;
    }
    else if ( Inventory == None )
        return None;
    else
        return Inventory.WeaponChange(F,bSilent);
}


This fixed my problem, it also makes it so it doesn't auto change weapons when they run out of ammo.
 

jack9911

Keyser Soze
Jul 11, 2002
40
0
0
44
BXL
www.unreal2zone.fr.st
the script is not compatible! :(
can anyone please help me converting it to 2k4 please? im not good enough at scripting to do it alone :( i swear i tried during a couple of hours but i cant find it :( :(:(
 

Wozzeck

New Member
Jun 1, 2004
6
0
0
Does not seem to like UT2004 or vice versa. Does not compile as-is, spits out error over difference between consumeammo in reloadingweapon and weapon classes. Tried simply renaming consumeammo function, compiled successfully, but cannot select reloading weapon in game, gives the "(weapon name) is out of ammo" message, even if you enter allammo code.
 

Dark[NSF]

Northwest Secessionalist Forces
Wozzeck said:
Does not seem to like UT2004 or vice versa. Does not compile as-is, spits out error over difference between consumeammo in reloadingweapon and weapon classes. Tried simply renaming consumeammo function, compiled successfully, but cannot select reloading weapon in game, gives the "(weapon name) is out of ammo" message, even if you enter allammo code.


show the code on a new post and you'll get alot more help ^^