ID:167987
Dec 29 2005, 7:49 am
|
|
Is there anyway to set Click() and DblClick(), so that as long as you hold down the left mouse button, the defined process will keep happening, like let's say, Click() fires the equiped weapon of a player, and let's say they have a machine gun. This is an instance where what's mentioned above would come into use. For as long as the mouse button is down, a steady stream of projectiles will be created and launched. I'd rather not have to make 3 - 5 projectiles created per mouse click. (Each seperate projectile listed) I'm looking for a way to loop the process. Thank you.
|
Dec 29 2005, 8:01 am
|
|
You could set it that, once they click once it fires till they click again or till they're out of ammo. Make a var for firing and look up while() or goto
|
Look up MouseDown() and MouseUp().
Create a loop in MouseDown() that only works if a var is true. Then in MouseUp(), make the var false. |
client An example for putting that to practical use might be like the following. client/proc/MouseHold() |
In response to Mysame
|
|
Thanks for you insight everyone.
|
In response to Loduwijk
|
|
That wouldn't be necessary. As MouseDown() gets called when you press the mouse down, and it continously gets called until you let go. So a simple atom/MouseDown() shooting procedure here is needed.
|