Jump to content

Two Fire Buttons... at the Same Time


Burgish

Recommended Posts

image.png.8ccbe0c744e322fee0e47a8e032c066e.png

"I always wanted to do that, man."

 

Hey all,

 

Making a weapons mod, and I'm trying to incorporate a number of different firing modes of each weapon.  Now I know its possible to add tertiary button etc... but I find this unwieldy - in every mod I kind of forget its there and use whatever is bound to L/R mouse button.

 

So my question is - it is possible to register both Fire and Altfire buttons at once?  I don't mean just pressing both buttons (although it would be nice to know about that too), what I want to know is if I am holding Fire (as with charging weapons), can I get a different result by pressing Altfire instead of releasing Fire - and vice versa.  It would be great to let a player charge a big attack and then still have options as to what attack occurs.

 

Are there any mods that do this?  I'd love to check them out.

 

Any help or advice is much appreciated.

 

-Burg

Edited by Burgish_Nilwert

Share this post


Link to post

you could set up fire hold states for your weapon that give player dummy inventory items to represent charge percentage, and run a script in those states to check if the other key is held and how many of those inventory items are needed for the new attack to execute, if it returns true, give player another dummy inventory item to tell the weapon to use the new attack state with a_jumpifinventory in your fire hold states

Share this post


Link to post

i think that A_WeaponReady unlocks the ability to enter the AltFire: state, maybe not. zdoom wiki doesn't say about it, or im a poor reader. Could be tested.

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
Reply to this topic...

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