WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

relAcc and rawAcc don't work.. why?

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
Lotti



Joined: 08 Jan 2007
Posts: 17

Digg It
PostPosted: 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
View user's profile Send private message
Amablue



Joined: 13 Dec 2006
Posts: 95
Location: California

Digg It
PostPosted: 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
View user's profile Send private message
Lotti



Joined: 08 Jan 2007
Posts: 17

Digg It
PostPosted: 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group