Game Development Community

Binding the mouse scrollwheel?

by Milo D. Cooper · in Hardware Issues · 06/17/2007 (8:01 pm) · 1 replies

How is it done?

e.g. Say if I wanted the player to jump when I rotate the scroll wheel forward (up):

moveMap.bind(mouse0, "???", jump);

#1
06/17/2007 (9:09 pm)
This should work... gonna have to test it.

function mouseScrollJump(%val)
{
   if ( %val > 0 )
      $mvTriggerCount2++;

}

moveMap.bind(mouse, zaxis, mouseScrollJump);