Page 1 of 1
Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 11:34 am
by metal_head
Is it possible with a script,or without (that will be better for me

) to make the weapons to be changed except with 1-9,with the mouse-wheel.All the games today have that,you can change your weapon with 1-9 and the mouse-wheel.
All I've done till now is that,and I'm not sure it's correct

:
Code: Select all
Start[ ()
{
Console(true);
LowLevel("run");
} ]
run[ ()
{
self.ThinkTime = 0.5; //that's because I want a little delay when you switch to the other weapon.
I don't know how it will be made in High-Level so I switched to Low-Level also.
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 6:06 pm
by Jay
I don't think it's possible, but maybe you could make it so that everytime the player presses the right mouse button the weapon switches, while left button is fireing.
Every time the weapon is switched you should set a timer so that the weapons don't change too fast (or like 5 times from on click)
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 6:24 pm
by metal_head
Well,yeah,but the right button is the sniper zoom.Why it's not possible btw?
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 6:34 pm
by Juutis
There's no way to see if you're actually using the wheel. You can only check if buttons are pressed.
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 6:45 pm
by metal_head
Oh,crap...than how the weapons in the other games can be changed using the Mouse-wheel
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 10:37 pm
by Jay
Pressing the mouse wheel (not turning it) is like pressing the middle button of a mouse... maybe you can use a middle mouse press instead? (I think it was called self.mbutton_pressed or something like that, search the docs to clarify...)
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 10:41 pm
by Juutis
Also, the keycode for the middle mouse button is 74, if my memory serves me right. Not everyone has a mouse with that kind of wheel though.
Re: Changing Weaoins Using The Mouse-Wheel.
Posted: Thu Aug 14, 2008 10:57 pm
by metal_head
well,the new mouses have a wheel,I wanted to change the weapon by scrolling the wheel,so that way I can choose another weapon,and I can go back to the previous one just by scrolling the opposite way.Too bad,but...I think I can live without the changing weapon by scroling

.