Jump to content
  • 0

Counting shots with Decorate


rivethead_

Question

I want to implement a mechanic with a custom weapon in GZDoom that makes the weapon fire an explosive round every 3 shots, similar to the Sheriff's Carbine in Roboquest, but I need a little guidance on how to set the weapon up to properly count its own shots.

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 1

You could use a "custom inventory trick":

You create a "dummy item" and you give it to the player every time you shoot normally, then, right before the shooting sequence, you check if the player has 3 of those dummy items and if he does, you make the thing return to another state where you make the weapon shoot the explosive round (and clear the player's inventory from the dummy items)

Edited by Kan3
Not if statement necessary

Share this post


Link to post
  • 0
48 minutes ago, Kan3 said:

You could use a "custom inventory trick":

You create a "dummy item" and you give it to the player every time you shoot normally, then, right before the shooting sequence, you check if the player has 3 of those dummy items and if he does, you make the thing return to another state where you make the weapon shoot the explosive round (and clear the player's inventory from the dummy items)

 

thank you for the input

Share this post


Link to post

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