Jump to content
  • 0

[GZDoom] Making weapons that aren't picked up automatically, only when a key is pressed.


SMG_Man

Question

Right now I'm working on making a large weapon set to be used for deathmatch, and one of the things I want to do is have the player restricted to carrying only one gun per weapon slot (1-9). For example, they can have the pistol, shotgun, chaingun, and plasma gun in their inventory concurrently since they use different weapon slots, but they can't have the shotgun and the super shotgun at the same time since they're both in slot 3. I've managed to get this part working fairly well mechanically by forcing the player to drop any other weapons from the same slot whenever they switch to a given weapon.

 

However, this can be a little frustrating in practice since the player will automatically pick up weapons that they don't have in their inventory when they come across them, which isn't a problem normally, but it can make something of a feedback loop if (for example) the player picks up the Super Shotgun -> drops the regular Shotgun -> waits a second before moving -> inadvertently picks up and switches to the regular Shotgun, dropping the Super Shotgun in the process.

 

Is there any way I can set it where for weapons specifically, running over them doesn't pick them up automatically, and instead a key has to be used to pick them up? Preferably some kind of "press E to pick up weapons" prompt or whatever would also come on screen when in range, but I get that would be a whole other load of worms.

Share this post


Link to post

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...