N.injallo
Joined: 01 Jul 2007 Posts: 1
Digg It |
Posted: 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 |
|
|