[ut2003] adventures in multimode weapons

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

CodePig

New Member
Apr 22, 2003
124
0
0
hi all-

i want to extend class Weapon to create a multimode weapon. in my first attempt, i have discovered that i do not understand how the weapon system works. i have read the description of the weapon firing process. of particular interest to me is the comment by Dante at the bottom of the page:

Dante: It seems as if UT is calling Weapon.ClientStartFire/Weapon.ServerStartFire which sets WeaponFire.bIsFiring = true (in Weapon.StartFire) which might be the trigger to call modeDoFire.

does anyone know what conditions must be met for the engine to call Weapon.ClientStartFire? the reason i ask is, in my first attempt, i subclassed Weapon and replaced references to the 'FireMode' array with references to a dynamic array and explicitly set FireMode[0] and FireMode[1] to 'none'. when this is done, the engine never calls 'ClientStartFire'. so, i am assuming that the engine is looking at the 'WeaponFire' in FireMode[0] or FireMode[1] to determine if ClientStartFire should be called. can anyone confirm this?

if so, i will have to maintain my list of WeaponFire's and move them into the FireMode array when appropriate.

thanks,
codepig
 

CodePig

New Member
Apr 22, 2003
124
0
0
i forgot to mention that i had looked at Unreal Wiki: Multiammo Weapons as well. that is pretty close, but what i really wanted to find out is, does the engine require the use of the FireMode[] array in class Weapon to call Weapon.ClientStartFire. i think it does, but i was hoping someone could confirm that.

i got my prototype/test code working. i'm using the work around i suggested in the initial post. it's not the way i really wanted to do it, but i guess that doesn't really matter. :)

thanks,
codepig