| View previous topic :: View next topic |
| Author |
Message |
SamTyson92
Joined: 16 Dec 2006 Posts: 34 Location: Hinckley, United Kingdom
Digg It |
Posted: Fri Jan 12, 2007 7:23 pm Post subject: Nunchuk Help |
|
|
Hi im trying to make a script that emulates mouse movement using the joy stick on the Nunchuk but need help with it as I cant test it aswell yet.
| Code: | left = (-1.2 < wiimote.Nunchuk.MouseX < -0.5)
right = (0.5 < wiimote.Nunchuk.MouseX < 1.2)
up = (-1.2 < wiimote.Nunchuk.MouseY < -0.5)
down = (0.5 < wiimote.Nunchuk.MouseY < 1.2)
left = (-1.2 < wiimote.Nunchuk.JoyX < -0.5)
right = (0.5 < wiimote.Nunchuk.JoyX < 1.2)
up = (-1.2 < wiimote.Nunchuk.JoyY < -0.5)
down = (0.5 < wiimote.Nunchuk.JoyY < 1.2) |
The second one is that I had before.
Please help ASAP |
|
| Back to top |
|
 |
Zac-uk
Joined: 09 Jan 2007 Posts: 26
Digg It |
Posted: Fri Jan 12, 2007 7:36 pm Post subject: |
|
|
You mean using the analog on the nunchuk to trigger keyboard keys?
| Code: | W = (-1.2 < wiimote.Nunchuk.JoyY < -0.5) //analog stick up
S = (0.5 < wiimote.Nunchuk.JoyY < 1.2) //analog stick down
A = (-1.2 < wiimote.Nunchuk.JoyX < -0.5) //analog stick left
D = (0.5 < wiimote.Nunchuk.JoyX < 1.2) //analog stick right |
Change W,A,S,D if you like to other keys.
Wait, SORRY! I didnt realise you said MOUSE, hmm, for mouse... Id say ask a IR expert, im still waiting for someone to help me on my situation, IR movement to keyboard outputs, but people just dont seem to care about making games like point blank for the PSX possible to play with the remote. |
|
| Back to top |
|
 |
SamTyson92
Joined: 16 Dec 2006 Posts: 34 Location: Hinckley, United Kingdom
Digg It |
Posted: Fri Jan 12, 2007 7:38 pm Post subject: |
|
|
| Zac-uk wrote: | You mean using the analog on the nunchuk to trigger keyboard keys?
| Code: | W = (-1.2 < wiimote.Nunchuk.JoyY < -0.5) //analog stick up
S = (0.5 < wiimote.Nunchuk.JoyY < 1.2) //analog stick down
A = (-1.2 < wiimote.Nunchuk.JoyX < -0.5) //analog stick left
D = (0.5 < wiimote.Nunchuk.JoyX < 1.2) //analog stick right |
Change W,A,S,D if you like to other keys. |
No I want it to emulate mouse movement like my Mouse scripts where you tilt the wiimote to move the mouse I want to do that on the Nunchuk. |
|
| Back to top |
|
 |
GizmoTheGreen
Joined: 14 Nov 2006 Posts: 121
Digg It |
Posted: Fri Jan 12, 2007 11:47 pm Post subject: |
|
|
here, use my script, i thimk someone realeased something like it before, this is still WIP, and it was even before the other script, test it out
| Code: | // By GizmoTheGreen
// Nunchuk Mouse
// Use the Nuchuk joystick to control ypur mouse!
var.addX = wiimote1.Nunchuk.JoyX / 50
var.addY = wiimote1.Nunchuk.JoyY / 50
debug = "X = " + var.addX + " Y = " + var.addY
mouse.x = var.addX + mouse.x
mouse.y = var.addY + mouse.y
mouse.LeftButton = wiimote1.Nunchuk.ZButton
mouse.RightButton = wiimote1.Nunchuk.CButton |
|
|
| Back to top |
|
 |
kunalkunal2
Joined: 13 Dec 2006 Posts: 279
Digg It |
Posted: Sat Jan 13, 2007 1:24 pm Post subject: |
|
|
There is also one on my website if you want to check it out? _________________ Check out my collection of my wii script's
freewebs.com/kunalkunal2 |
|
| Back to top |
|
 |
|