loading

Can anyone give me a glovepie script to control the mouse cursor via wii classic controller?

I have searched many sites but there is nowhere. I want to control my pc and my mouse cursor like I do in fifa 2010 for wii

adi.wsp.31 year ago

ppjoy.analog0 = (mouse.cursorposx - 125) / 900
ppjoy.analog1 = (mouse.cursorposy - 384) / 384
ppjoy.analog0 = MapRange(mouse.cursorposx, 0,3000, -10,-10)
ppjoy.analog1 = MapRange(mouse.cursorposy, 0,767, -1,1)


ppjoy.digital0 = mouse.LeftButton
ppjoy.digital1 = mouse.RightButton
ppjoy.digital2 = mouse.MiddleButton
ppjoy.digital3 = mouse.XButton1
ppjoy.digital4 = mouse.XButton2

ppjoy2.digital0 = mouse.LeftButton

bg4m3r5 years ago
var.dz = 0.2 // 0.0 - 1.0
var.spd = 5 // 0 - 100

if Classic1.RightStickY < -(var.dz) or Classic1.RightStickY > (var.dz)
Mouse.DirectInputY = Mouse.DirectInputY + (var.spd)*(Classic1.RightStickY)
endif
if Classic1.RightStickX < -(var.dz) or Classic1.RightStickX > (var.dz)
Mouse.DirectInputX = Mouse.DirectInputX + (var.spd)*(Classic1.RightStickX)
endif

A little more advanced than the above answer...this will let you define a deadzone on the stick, as well as set the mouse speed by changing the var values at the top. If you need to fine tune each axis separately for some reason, just change the vars for one axis to something else and define them at the top. :)
Mouse.DirectInputPos += (classic1.RightStick * 10)

Will make the mouse move with the right thumbstick