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 

Nunchuck Joystick help

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiLi HowTo
View previous topic :: View next topic  
Author Message
N.injallo



Joined: 01 Jul 2007
Posts: 1

Digg It
PostPosted: Sun Jul 01, 2007 12:51 am    Post subject: Nunchuck Joystick help

i must be the biggest noob for this
but ima huge counterstrike fan n im not liking the movment of the wiimote to rotate and tha i wanna use the nunchucks joystick to mimic the mouse movement for rotation and looking up and down so im guessing the X and Y axis of the mouse but i cant figure out the right codes can anyone give me a hand with this



nevermind i figured it out
i didnt have mouse.x mouse.y i had cusor.x and cusor.y

var.addX = wiimote1.Nunchuk.JoyX / 50
var.addY = wiimote1.Nunchuk.JoyY / 50

mouse.x = var.addX + mouse.x
mouse.y = var.addY + mouse.y

Code:
//Counter Strike Source, Garry's Mod, and Half Life controls
//Created By N.injallo contact me at n.injallo[at]hotmail[dot]com
//No IR Sencor bar
//no motion needed(the jump is put into 2 differnt things
//flick of the wiimote or a button


//For moving your character farword and side to side
A = Wiimote.Left
D = Wiimote.Right
W = Wiimote.Up
S = Wiimote.Down

//Jump and talk
Space = Wiimote.Nunchuk.CButton
X = Wiimote.Nunchuk.ZButton

//Reload and use action
R = wiimote.Minus
E = Wiimote.Home

//Toggles Crouching and walking
if wiimote.One and not wiimote.Two then
   Ctrl = true
   Shift = false
   var.crouch = false
   wiimote.Led1 = true
   wiimote.Led2 = false
endif

if wiimote.Two and not wiimote.One then
   Shift = true
   Ctrl = false
   wiimote.Led1 = false
   wiimote.Led2 = true
endif

if wiimote.One and wiimote.Two then
   Ctrl = false
   Shift = false
   wiimote.Led1 = false
   wiimote.Led2 = false
endif

 // plus to cycle through weapons
Mouse.WheelUp = wiimote.Plus

//Shoot your gun and secondary options
Mouse.LeftButton = Wiimote.B
Mouse.RightButton = wiimote.A

//This is the rumble for when you shoot.
var.rumble = true
if Mouse.LeftButton then
   wiimote.Rumble = true
   wait 10 ms
   wiimote.Rumble = false
endif

//jump by flicking the wiimote up
if var.accy >= 30 then
   Space = true
else
   Space = false
endif

//This Controls the mouse movement
var.addX = wiimote1.Nunchuk.JoyX / 50
var.addY = wiimote1.Nunchuk.JoyY / 50
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiLi HowTo 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