| View previous topic :: View next topic |
| Author |
Message |
Lotti
Joined: 08 Jan 2007 Posts: 17
Digg It |
Posted: Sun Jan 28, 2007 8:04 pm Post subject: relAcc and rawAcc don't work.. why? |
|
|
| if i debug them i got always 0.00 m/s/s |
|
| Back to top |
|
 |
Amablue
Joined: 13 Dec 2006 Posts: 95 Location: California
Digg It |
Posted: Sun Jan 28, 2007 8:13 pm Post subject: |
|
|
| Show us exactly what the line is so we can see what you're doing. |
|
| Back to top |
|
 |
Lotti
Joined: 08 Jan 2007 Posts: 17
Digg It |
Posted: Sun Jan 28, 2007 8:45 pm Post subject: |
|
|
| Code: |
// X/Y offsets for Analog. If it's too sensitive then make the numbers larger.
var.xOff = .07
var.yOff = .07
//Switch off the leds
Wiimote.leds = 0
//
// Game buttons.
//
key.Enter = Wiimote.Home
key.a = Wiimote.A
key.s = Wiimote.B
key.a = Wiimote.Nunchuk.ZButton
key.Tab = Wiimote.One
key.Space = Wiimote.Two
//
// Analog Movements
//
if Wiimote.Nunchuk.JoyX < -var.xOff then
key.Left = true
else key.Left = false
endif
if Wiimote.Nunchuk.JoyX > var.xOff then
key.Right = true
else key.Right = false
endif
if Wiimote.Nunchuk.JoyY < -var.yOff then
key.Up = true
else key.Up = false
endif
if Wiimote.Nunchuk.JoyY > var.yOff then
key.Down = true
else key.Down = false
endif
//
// Wiimote Movements
//
if (Wiimote.RelAccX >= 10 and Wiimote.RelAccY >= 10) then // For Lob
key.s = true
Wiimote.Rumble = True
Wait 200 ms
key.s = false
Wiimote.Rumble = False
endif
if Wiimote.RelAccX >= 30 then // For smash
key.a = true
Wiimote.Rumble = True
Wait 200 ms
key.a = false
Wiimote.Rumble = False
endif
debug = wiimote.RawAccX + ' ' +wiimote.RelAccX + ' ' + wiimote.RawAccY + ' ' +wiimote.RelAccY
|
|
|
| Back to top |
|
 |
|