TurkeyFried
Joined: 19 Jan 2007 Posts: 2
Digg It |
Posted: Fri Jan 19, 2007 4:41 am Post subject: Bomberman Hero (Wiimote + Nunchuck) |
|
|
This is my first Wiimote script. I've been messing around with the controls and I think it's working pretty good. I took the Nunchuck movements from Blazman's Mario Tennis script, as a placeholder while I write my own.
| Code: | /* Bomberman Hero by TurkeyFried
Make sure the analog and buttons are set
to their respective keys. (A = A, U = Up and so on)
As for the C-buttons, use these settings:
Up = Home
Down = End
Left = Delete
Right = Page Down
A = Jump
B = Attack
Plus = Start
Nunchuck controls movement
*/
Wiimote.Leds = 0
// Abilities
A = Wiimote.A
B = Wiimote.B
S = Wiimote.Plus
R = Wiimote.Nunchuk.ZButton
// Camera (Note that there's no Down option in the game.
Delete = Wiimote.Left
PageDown = Wiimote.Right
Home = Wiimote.Up
// Movement (by Blazman)
if Wiimote.Nunchuk.JoyX >= 0.2{
Right = True
wait 5 ms
Right = False
}
if Wiimote.Nunchuk.JoyX <= -0.2{
Left = True
wait 5 ms
Left = False
}
if Wiimote.Nunchuk.JoyY >= 0.2{
Down = True
wait 5 ms
Down = False
}
if Wiimote.Nunchuk.JoyY <= -0.2{
Up = True
wait 5 ms
Up = False
} |
|
|