Jump to content
  • 0

Gun butt melee?


Kek

Question

Let's say that I wanted to implement a gunbutt melee into my mod. That is to say, you press "F" and you give a snappy little lovetap to whatever's in melee range with the stock of your weapon.

 

How would I make that happen?

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

The easiest way is to use altfire in decorate and to set f as your altfire key, as far as I know. 

Ex:

 

Fire:

Tnt1 A 0

Goto ready 

 

Altfire:

TNT1 A 0 A_Punch

Goto ready

 

 

Edited by zaszthedestroyer

Share this post


Link to post
  • 0

You could use KEYCONF to make a button that executes an ACS script that gives you an item, and use a jump action to do the gun butt if it's in your inventory.

 

Example of decorate code for the weapons:

...

Ready:

PIST E 1 A_Weaponready

TNT1 A 0 A_jumpifinventory("Domelee","Bash")

loop

Bash:

TNT1 A 0 A_takeinventory("Domelee",1)

(Just put whatever the melee thing you do is here)

goto ready

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