Multiple Ammo Types

  • 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
How would I go about using 2 different ammo types for a weapon. I supposed I could do this via a subclass of all the tournament players and add in special variables, which are modified by the pickups (which isn't too bad seeing as I'm making a new game type).

Any help would be appreciated.
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
Well there are several ways to do this, but the easiest way really depends on how you want to give the different types of ammo. As pickups? You could just hack your ammo types to replace the current ammo in the weapon, so if a player walks over the explosive ammo it will jettison the normal ammo, and vice versa. I think you'll probably want a way for the player to switch ammo, and if that's so you might consider just using altfire to do this, and just setup a toggle between the ammo modes in your weapon. Basically with the second method you would sort of 'fake' having multiple ammos... :)
 

Postal

I apear to have lost my pin.
Nov 14, 1999
1,388
0
0
WoD.BeyondUnreal.com
There are several ways to do this

One, change the guns ammo type(which works fine from something like the multimag), but if you want to use 2 different firing modes(like a m16/m203) if you run out of one ammo, if your codes not good, you cant use the gun
(I have a good working verson of this, but I dont think I want to part with it)

I hate thwe idea of custom playerpawn, there are other ways to do that

or you could have the gun use a different var for ammo(a var int in the gun) and have a special ammo class that addes the that var in the gun

there was a third way I have made multi-ammo, but I cant think of it right now
 

vlosk

New Member
Feb 4, 2001
25
0
0
vlosk.unrealcenter.com
THe ammo itself?

make your own ammo class, have the weapon toggle a boolean or int value, and have the ammo behave as such:

What mode am i in?

mode one: ammoamount = Mode1AmmoTotal
Mode two: .....


Thats pretty much it, one ammo type, keeping track of different variables, officially using whatever type is set to the current mode.