Page 1 of 1

A_GiveWeapon()

Posted: Mon Jun 06, 2005 1:26 pm
by DoomRater
The problem I'm having with GiveInventory(weaponname) is that it does not autoselect even with NEVERSWITCHONPICKUP false. The usual workaround is to manually select it, but that always selects the weapon even when NEVERSWITCHONPICKUP true. Shouldn't the Berserk be the only item that does this? This is annoying, and I dunno if there's a way to check for the CVAR NEVERSWITCHONPICKUP. Either way, a seperate code pointer would be nice.

Posted: Mon Jun 06, 2005 1:55 pm
by Graf Zahl
It's called A_SelectWeapon.

Posted: Mon Jun 06, 2005 2:05 pm
by DoomRater
Like I said, this selects the weapon even when NEVERSWITCHONPICKUP is set to true. That's not what I'm looking for... (specifically I want to get the dualSMG code working up to scratch)

What I need is either a way to check for NEVERSWITCHONPICKUP or a seperate codepointer which automatically does this by using the original weapon code. Personally I'd like a specific codepointer for it.

Posted: Mon Jun 06, 2005 3:28 pm
by Graf Zahl
NEVERSWITCHONPICKUP does not apply because technically you aren't picking up a weapon.

Posted: Mon Jun 06, 2005 4:24 pm
by DoomRater
Graf Zahl wrote:NEVERSWITCHONPICKUP does not apply because technically you aren't picking up a weapon.
Which is why I'd like to either check for it or make a pointer that does check for it.

Posted: Tue Jun 07, 2005 10:14 am
by Phobus
instaed of using the give weapon command, why not summon it, then all rules of pickups still aply

Posted: Tue Jun 07, 2005 11:08 am
by DoomRater
In a DECORATE weapon? That sure would look unprofessional. I'd much rather handle it somehow. But since I'm not getting much feedback I think it's time for me to check around and find out if CVARs can be checked within DECORATE, and if not push for that instead.

Posted: Wed Jun 08, 2005 8:59 pm
by chaoscentral
what about this pointer is needed for a dual smg

Posted: Wed Jun 08, 2005 9:33 pm
by DoomRater
Exactly.... it would really help out there.

Code: Select all

TNT2 0 JumpIfInventory(SMGGun,1,1)
Stop
TNT2 0 A_GiveWeapon(dualSMG)
Stop