Ammo and HUD's

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

aspie

It's all good baby.
Feb 24, 2001
315
0
0
40
Australia
Can someone please explain the code that draws the ammo ammounts on the screen. Well actually i know how to draw it to the screen, i need to know how to obtain it.

I only have 5 weapons presumably in slots 1-5.

Thanks in advance!
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
To get the ammo count of a player's current weapon ammo count just look ref something like this:

Player.Weapon.AmmoType.AmmoAmmount

To find the ammo for a specific weapon in a Player's inventory you would have to do something like this:

local MyWeapon weap;

weap = MyWeapon(Player.FindInventoryType(class'MyWeapon'));
if (weap != None)
{
// deal with ammo ammount here
//weap.AmmoType.AmmoAmount
}

Does that help?