• 0

(Decorate) Making a weapon unselectable when out of primary ammo?

Question

Ok first off, there's a catch: The altfire doesn't use any ammo and I think that's what causes my weapon to be selectable even when out of primary fire ammo. Is there a way to make the game ignore the altfire availability and refuse to select the weapon? Possibly even through manually pressing the weapon select key.

 

The reason I want to do this is because it's a grenade esque weapon and I don't want it showing up when the player has no grenades. But I suck at Decorate so I have no idea how to do it. I've tried just about everything but nothing I came up with has worked.

 

Wad with spaghetti decorate code attached to post, run in Hexen, ignore the unfinished sprites and the very mature and serious weapon concept.

flechette.zip

Share this post


Link to post

2 answers to this question

  • 1

Firstly, there is a player-side option that controls whether you can or can't select weapons that are out of ammo, which I believe would override modder-side features. As for modder-side, I'm not sure how exactly the engine handles the weapon flags and hitscan/projectile-firing action flags, but for a workaround, maybe make the alt fire consume a single unit of alt ammo per shot and give this alt ammo to the player in the weapon's ready state and take it away in the weapon's lower state, so that the player will have none of this ammo while the weapon is not selected.

Share this post


Link to post
  • 0

That seems to have done the trick. Thanks man. I had considered making a dummy ammo type when trying to fix it earlier but I wasn't sure how to implement it. This works perfectly, thanks again.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now