Quote:
Originally Posted by Angel_Light
I'm just curious, is there a way to make it add and minus speed using the mouse wheel?
|
In a timeout something like this
PHP Code:
function onTimeOut()
{
if ( mousewheeldelta > 0 && this.speed > 1 )
{
this.speed -= 1;
}
if ( mousewheeldelta < 0 && this.speed < 10 )
{
this.speed += 1;
}
setTimer( 0.05 );
}
Sorry about horrible formatting ... the mousewheeldeltas might need to be altered (I forget which way is which).
[EDIT]
Tested this, and fixed the mousewheeldeltas.
Also, this.status = abs(temp.status - 1);?
Should be:
this.status = 1 - this.status;
or:
this.status = abs(
this.status - 1);