| View previous topic :: View next topic |
| Author |
Message |
Pat1487
Joined: 08 Jan 2007 Posts: 59
Digg It |
Posted: Mon Jan 15, 2007 9:24 pm Post subject: 17 button PPJoy controller (Wiimote + nunchuk) |
|
|
Makes the wiimote used like a normal controller would be in games, except with the benefits of the wiimotes unique motion system
| Code: | /*
In PPJoy set up a virtual controller with 2 axis and 17 buttons, Button 1 is
Digital 1, Button 2 is Digital 2, ect
In your game just select the PPjoy controller as your controller and use the
games button mapping system to map the buttons with the wiimote
You can map buttons to motions so if you want jump to be when you flick the
wiimote up then when your mapping the button for jump just flick the wiimote
in the motion you want and that will become jump, theres 4 buttons that are
done with motions, moving the wiimote up or down, wiimote right or left,
nunchuk up or down, and nunchuk right or left
*/
//This varible controlls the ammount of force you need to use when moving the
//wiimote or nunchuk, make it lower if you want to use less force when moving the
//wiimote or nunchuk
var.ForceSensitivity=15
PPJoy.Analog0=wiimote.Nunchuk.JoyX
PPJoy.Analog1=wiimote.Nunchuk.JoyY
ppjoy.digital1 = Wiimote.A
ppjoy.digital2 = Wiimote.B
ppjoy.digital3 = Wiimote.Home
ppjoy.digital4 = Wiimote.Plus
ppjoy.digital5 = Wiimote.Minus
ppjoy.digital6 = Wiimote.Up
ppjoy.digital7 = Wiimote.Down
ppjoy.digital8 = Wiimote.Left
ppjoy.digital9 = Wiimote.Right
ppjoy.digital10 = Wiimote.One
ppjoy.digital11 = Wiimote.Two
ppjoy.digital12 = Wiimote.Nunchuk.RawAccy > var.ForceSensitivity or < -var.ForceSensitivity
ppjoy.digital13 = Wiimote.RawAccX > var.ForceSensitivity or < -var.ForceSensitivity
ppjoy.digital14 = Wiimote.Nunchuk.RawAccx > var.ForceSensitivity or < -var.ForceSensitivity
ppjoy.digital15 = Wiimote.RawAccy > var.ForceSensitivity or < -var.ForceSensitivity
ppjoy.digital16 = wiimote.Nunchuk.CButton
ppjoy.digital17 = wiimote.Nunchuk.ZButton
//debug =Wiimote.Nunchuk.RawAccy + " " + Wiimote.Nunchuk.RawAccx |
My 3rd script |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Thu Jan 18, 2007 4:57 am Post subject: |
|
|
| You are better off using RelAccX etc instead of RawAccX since RelAccX tries to filter out Gravity. Otherwise it is easier to do a vertical motion than a horizontal one. |
|
| Back to top |
|
 |
vbsoccerdude94
Joined: 15 Jan 2007 Posts: 30
Digg It |
Posted: Thu Jan 18, 2007 11:28 am Post subject: |
|
|
| So does this script allow you to use your Wiimote as you would a normal Joystick? |
|
| Back to top |
|
 |
Pat1487
Joined: 08 Jan 2007 Posts: 59
Digg It |
Posted: Thu Jan 18, 2007 6:03 pm Post subject: |
|
|
| CarlKenner wrote: | | You are better off using RelAccX etc instead of RawAccX since RelAccX tries to filter out Gravity. Otherwise it is easier to do a vertical motion than a horizontal one. |
I saw most scripts using Raw and just assummed it was the best choice for motion, I was going to start using gx, gy, and gz, because i was getting better results then with Raw, but I havent even tried using Rel yet, Thanks for the tip
| vbsoccerdude94 wrote: | | So does this script allow you to use your Wiimote as you would a normal Joystick? |
Yeah, as if it was a controller made for the PC, in games that support using controllers. |
|
| Back to top |
|
 |
|