Mouse 2 to throw nade on release
#1
Hey,

trying to make a bind so when I right click it picks up gernade and when I release it throws it

cant get it to work, what I got at m:
bind "MOUSE2" [ [altaction]; onrelease [altaction] ]

but it just switches to grenade without throwing it when I release the key.

Any help apreciated
Thanks given by:
#2
bind "MOUSE2" [if (= (curweapon) 5) [altaction; onrelease [altaction]] [quicknadethrow]]

Should work.
:P
Except i cant e sure what the curweapon number is.
Thanks given by:
#3
thx for help but this didnt work. basically Id like that when I right click it switches to grenade and throws when release the right click whatever the weapon I got.
I tried different things based on what you gave me removing the if isntruction but cant get it to work, it only switches to nade.
Thanks given by:
#4
What exactly are you wanting?
You cant have it throw the grenade automatically, its not allowed.
Thanks given by:
#5
Not automatically, lemme try to make it clear :

When pushing right click it switches to grenade and "prepare" it; when releasing right click it throws it.

so basically if i got primary weapon in hand and push right click it will switch to grenade so I just have to release right click to throw. And if you dotn release right click it just explodes in ur hand of course.

I have tried different stuffs but nothing works, it switches to grenade but never throwse it on releasing right click.

Some exemples of what is not working :
[altaction; sleep 3; altaction]
[altaction; onrelease [altaction] [quicknadethrow]]
Thanks given by:
#6
First issue with this, is that it would ruin the sniper scope, secondly its illegal.
Thanks given by:
#7
well could aswell use another button, why is it illegal?
Actually Im jusrt trying to reproduce The grenade bind for call of duty. On cod you can assign a key to grenade so whatever the weapon you have it switches to nade and throws on release.
Thanks given by:
#8
Okay, well, to explain. This isn't Call of Duty, the gameplay is alot different and such a switch, would hold a massive advantage over all others whom don't have this script, and its not just a auto-switch, which, is already considered an unfair advantage, but an attack too.
Thanks given by:
#9
(27 Sep 10, 04:26PM)dust Wrote: Not automatically, lemme try to make it clear :

When pushing right click it switches to grenade and "prepare" it; when releasing right click it throws it.

so basically if i got primary weapon in hand and push right click it will switch to grenade so I just have to release right click to throw. And if you dotn release right click it just explodes in ur hand of course.

I have tried different stuffs but nothing works, it switches to grenade but never throwse it on releasing right click.

Some exemples of what is not working :
[altaction; sleep 3; altaction]
[altaction; onrelease [altaction] [quicknadethrow]]

Try 1.0.4, where quicknadethrow isn't spoilt? :)

PS. Next reason for "1.1 haters". ;P

EDIT: http://forum.cubers.net/thread-1026-post...l#pid16670 - quicknadethrow isn't broken, but only hidden. :)
Thanks given by:
#10
I know its cod but the grenades bind on cod being much better than here (not to mention im used to it) I just wanted to reproduce it with a script.

There are scripts for every game, you can consider thats an advantage for those using it but another advantage is using a good PC or having a low ping or a high frame rate.
Scripts are not cheats if thats what your referring to.

And this is not an auto-switch since you have to actually push a key to switch and release it to throw.

Edit :
I got a script for melee so if your using another weapon it switches to knife and does a melee attack (hold key) :
bind "MOUSE3" [ [melee]; [attack]; onrelease [attack] ]

Edit 2 :

actually works for then ade too if you hold the key 1 second then release to throw :
bind "MOUSE6" [ [grenades]; [attack]; onrelease [attack] ]
Thanks given by:
#11
ac binds are better because i played it first.
your logic is flawed
Thanks given by:
#12
its not about logic its about personal taste.
Didnt ask any1 to like it, just was trying to make it work the way I want it to work. The thread was about how to do not a poll to know if you like it or not.
Thanks given by:
#13
Lolwut, quicknadethrow is "illegal" in 1.1? stef Brahma went crazy.
Thanks given by:
#14
(27 Sep 10, 04:26PM)dust Wrote: When pushing right click it switches to grenade and "prepare" it; when releasing right click it throws it.
/quicknade_hold 1
Then just hold right mouse button until you are ready to throw. Quicknadethrow is not "spoilt" in 1.1.
Thanks given by:
#15
Do the command Gibstick mentions. Just hold right click to take it out and cook it, then release to throw :)
Thanks given by:
#16
thanks for that
Thanks given by:
#17
LOL
You guys are weird.
From the default, add this to your settings:
/quicknade_hold 1
and your button will function that way.
If you want to use it that way while you have the sniper rifle, go into scripts.cfg and delete line 124 from scripts.cfg:
alias altaction_5 [ setscope 1; onrelease [ setscope 0 ] ] // Sniper
And you'll probably want to bind the scope function to another key.
bind "J" [setscope 1; onrelease [setscope 0]]
Also, onrelease [attack] won't do anything in 1.1.
Thanks given by:
#18
Cheers,

so basically to summarise what I did :

/quicknade_hold 1
thats to enable the quick nade throwing

then to throw nade with mouse 6 button I edited saved.cfg :
bind "MOUSE6" [grenades; altaction]

Then in scripts.cfg I removed the following line :
alias altaction_5 [ setscope 1; onrelease [ setscope 0 ] ] // Sniper

and in saved.cfg I bound mouse 2 (right click) to scope :
bind "MOUSE2" [setscope 1; onrelease [setscope 0]]
and I bound Mouse 3 to melee attack even if carrying another weapon :
bind "MOUSE3" [ [melee]; [attack] ]



Thanks to the ppl who helped
Thanks given by:
#19
(27 Sep 10, 04:32PM)Shorty Wrote: secondly its illegal.

And where did you get your info?

---

bind "MOUSE3" [ [melee]; [attack] ]
Well, all those extra brackets are not necessary.
bind "MOUSE3" [ melee; attack ]

Also, Mouse2 would not do anything unless you're using a sniper, but it might be what you wanted.
Thanks given by: