Already a member?
Sign in
- EasyEdit
- Edit tags
- Email page
-
(what's this?What are these tools?
People just like you can add or edit the content on this site. If you want to try editing, but aren't ready to add to this site, try our demo area.
Read more about editing pages at Wetpaint Central.
)
Wiimote Glove PIE scripts
Questa è una pagina dedicata alla raccolta di scripts homebrew per il proprio Wiimote.Da utilizzare con Glove PIE.Inizio io col pubblicare 2 script.
Ogni script dovrà essere accompagnato da una piccola descrizione e il nome di chi lo ha postato,e scritto in carattere corsivo grandezza 10pt.
Per utilizzare i seguenti script basta seguire l articolo seguente per collegare il wiimote al computer,copiare ed incollare il codice nella finestra di Glove PIE e per ultima cosa cliccare sul tasto RUN.
Ecco infine un articolo da me scritto a proposito di questi scripts e di Glove PIE.
GUITAR HERO III
// Guitar Hero III w/ WiiGuitar
/*
-Use "Default Keyboard/Mouse" config in the game, I said "DEFAULT KEYBOARD/MOUSE"
or you won't be able to use the whammy bar
-As the whammy bar usage could cause problems in windows mouse navigation, it can be turned
ON and OFF with the HOME BUTTON.
notes: -created using brazilian keyboard(ABNT) any problems try to solve(EASY), sorry...
-created using my WiiGuitar Whammy bar calibration, the game may recognize
the motion of the your whammy bar even when is not beeing used, try to calibrate(EXPERT) by
changing the values down there...
-This Whammy bar method is the best i could do, if you know any other method,
let me know.
-The leds on the Wiimote indicates if the Whammy Bar is ON/OFF.
Lights randomly chosen.
Have fun!
by luisfhb
*/
Key.v = Wiimote1.Guitar.Fret1
Key.c = Wiimote1.Guitar.Fret2
Key.x = Wiimote1.Guitar.Fret3
Key.z = Wiimote1.Guitar.Fret4
Key.LeftShift = Wiimote1.Guitar.Fret5
mouse.MiddleButton = Wiimote1.Guitar.Minus
Key.BackSpace = Wiimote1.Guitar.Plus
mouse.RightButton = Wiimote1.Guitar.StrumUp
mouse.LeftButton = Wiimote1.Guitar.StrumDown
//whammy
if wiimote1.Home = 1 and var.whammy = 0 and var.home = 0
var.whammy = 1
var.home = 1
wiimote1.Leds = random(15)+1
endif
if wiimote1.Home = 0 and var.home = 1
var.home = 0
endif
if wiimote1.Home = 1 and var.whammy = 1 and var.home = 0
var.whammy = 0
var.home = 1
wiimote1.Leds = 0
endif
if var.whammy = 1
mouse.DirectInputX = mouse.DirectInputX+ (160*wiimote1.Guitar.WhammyBar-88)/0.32 //if you're wanting to calibrate the whammy bar here you should be changing. "88" is 160*(Whammy bar fully extended) and "0.32" is (Whammy bar fully pressed)-(Whammy bar fully extended)
endif
//starpower
if (Wiimote1.smoothPitch > 40) and var.apertou = 0
mouse.MiddleButton = 1
var.apertou = 1
wait 100ms
mouse.MiddleButton = 0
endif
if wiimote1.smoothpitch < 40
var.apertou = 0
endif
debug = "Whammy bar value: " + wiimote1.Guitar.WhammyBar + " | Use this value to calibrate the Whammy bar. Instructions down in the script"
PACMAN
Up = wiimote.Up
Down = wiimote.Down
Left = wiimote.Left
Right = wiimote.Right
if wiimote.left = true then wiimote.Led1 = 1 else wiimote.led1 = 0;
if wiimote.Up = true then wiimote.Led2 && wiimote.Led3 = 1 else wiimote.Led2 && wiimote.Led3 = 0;
if wiimote.Right = true then wiimote.Led4 = 1 else wiimote.led4 = 0;
Postato da Peppo1616.Questo script è adatto per giocare a pacman online ed inoltre è adatto per tutti quei giochi 2d in cui basta l uso delle frecce direzionali.Piccola funzione aggiuntiva è quella dell illuminazione istantanea dei led quando si spinge il pulsante Up,Left,Right.
WIINDOWS MEDIA PLAYER 11
//Wiimote WMP Control
//Created By Xarath and modified by peppo1616 for wmp11
//Windows Media Player must be the front window while using this! This
//is very basic and is meant for you coding-impared. ;)
//
//Controls:
// Plus - Next Song
// Minus - Previous Song
// Home - Play/Pause
// Left - Volume down
// Right - Volume up
// Up - Speed Up
// Down - Slow down
// A - Normal Speed
// B - No use.
// 1 - Toggle (repeat)
// 2 - FullScreen (schermo intero)
//sostituito f9 da f8 e f10 da f9 rispetto la versione di Xarath
Control && F = Wiimote.Plus
Control && B = Wiimote.Minus
CTRL && P = Wiimote.Home
F8 = Wiimote.Left
F9 = Wiimote.Right
Control && Shift && N = Wiimote.A
Control && Shift && G = Wiimote.Up
Control && Shift && S = Wiimote.Down
Control && T = Wiimote.One
Alt + Enter = Wiimote.Two
Postato da Peppo1616.Questo script originalmente scritto da Xarath è stato modificato da me stesso per renderlo utilizzabile con Wmp11,le funzioni sono descritte nel codice.Funzioni Aggiuntive,Repeat,ripete la canzone appena ascoltata e Full screen nel caso di visualizzazione di video.
FPS UPGRADE Senza IR (testato con Quake3)
// Code for playing FPS Games
// Posted by Kasten and modified by Peppo1616 for using the Nunchuck and Arrows.
/* NOTE for this code to work right with the wiimote please
read the following */
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6
var.xOffset = -3
var.yOffset = -28
var.zOffset = -2
// Change this if you would like your mouse to go faster
var.speed = 10
// change these to a higher number if your hands are not steady or lower if they are
var.xCutoff = 4
var.zCutoff = 4
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
debug = 'X:' + var.xRot + ', ' + 'Y:' + var.yRot + ', ' + 'Z:' + var.zRot
// This is the code that moves your mouse
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot + var.zCutoff)
// Press 1 on the wiimote to press e on the keyboard
e = Wiimote.OneEnter = Wiimote.Two/ B for left click and A for right click
mouse.LeftButton = Wiimote.B
mouse.RightButton = Wiimote.A
// Plus and Minus on the wiimote to use the scroll wheel
// get for scrolling though weapens in fsp games
mouse.WheelUp = Wiimote.Plus
mouse.WheelDown = Wiimote.Minus
// Rumbles wiimote when shift is pressed on your keyboard
Wiimote.Rumble = Shift
// Have some fun and press 1, 2, 3, and/of 4 to little up the lights on the wiimote
Wiimote.Led1 = four
Wiimote.Led2 = three
Wiimote.Led3 = two
Wiimote.Led4 = one
// If you move your controler up and down quickly then it will press space
// Great for jumping on games
if var.yRot >= 100 then space = true else space = false
//added code to use Cbutton and joy to strafe in game with the Nunchuk
//C button on Nunchuk is CTRL on the keyboard;I use this to jump in the game.
Right = 1 > Wiimote1.Nunchuk.JoyX > 0.5
Left = -1 < Wiimote1.Nunchuk.JoyX < -0.5
down = 1 > Wiimote1.Nunchuk.JoyY > 0.5
up = -1 < Wiimote1.Nunchuk.JoyY < -0.5
control = wiimote.Nunchuk.CButton
Postato da Peppo1616.Testato con Quake3 arena,infatti lo script serve per giocare pienamente a giochi
FPS con solo l uso del wiimote.
Tasti:

Link guida
Video guida
FPS Tremulous (utile anche per altri FPS ma non testato)
var.irAmount = 2 // 1 OR 2
Mouse.LeftButton = wiimote.B
Mouse.RightButton = wiimote.A
Mouse.WheelDown = wiimote.Minus
key.tab = wiimote.Home
key.r = wiimote.Right
key.C = wiimote.Down
key.Z = wiimote.Up
key.V = wiimote.Left
Mouse.WheelUp = wiimote.Plus
key.q = wiimote.1
key.e = wiimote.2
var.xtrim = 4
var.ytrim = -30
var.ztrim = 6
var.accx = wiimote.RawForceX + var.xtrim
var.accy = wiimote.RawForceY + var.ytrim
var.accz = wiimote.RawForceZ + var.ztrim
if wiimote.dot1vis and wiimote.dot2vis then
if var.accy > -7 then
var.orientation = 0
elseif var.accy > -45 then
if var.accx < 0 then
var.orientation = 3
else
var.orientation = 1
endif
else
var.orientation = 2
endif
if var.leftpoint = 0 then
if var.orientation = 0 then
if wiimote.dot1x < wiimote.dot2x then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 1 then
if wiimote.dot1y > wiimote.dot2y then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 2 then
if wiimote.dot1x > wiimote.dot2x then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 3 then
if wiimote.dot1y < wiimote.dot2y then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
endif
if var.leftpoint = 1 then
var.fix1x = wiimote.dot1x
var.fix1y = wiimote.dot1y
var.fix2x = wiimote.dot2x
var.fix2y = wiimote.dot2y
else
var.fix1x = wiimote.dot2x
var.fix1y = wiimote.dot2y
var.fix2x = wiimote.dot1x
var.fix2y = wiimote.dot1y
endif
var.dx = var.fix2x - var.fix1x
var.dy = var.fix2y - var.fix1y
var.cx = (var.fix1x+var.fix2x)/1024.0 - 1
var.cy = (var.fix1y+var.fix2y)/1024.0 - .75
var.d = sqrt(var.dx*var.dx+var.dy*var.dy)
var.dx = var.dx / var.d
var.dy = var.dy / var.d
var.ox = -var.dy*var.cy-var.dx*var.cx;
var.oy = -var.dx*var.cy+var.dy*var.cx;
var.ax = (var.ox * screen.desktopwidth) + (screen.desktopwidth / 2)
var.ay = (-var.oy * screen.desktopwidth) + (screen.desktopheight / 2)
var.dx = var.ax - mouse.cursorposx
var.dy = var.ay - mouse.cursorposy
var.d = sqrt((var.dx*var.dx)+(var.dy*var.dy))
var.a = 180 / (200 + var.d * var.d * var.d * .001)
var.finalx = mouse.cursorposx * var.a + var.ax * (1 - var.a)
var.finaly = mouse.cursorposy * var.a + var.ay * (1 - var.a)
mouse.cursorposx = var.finalx
mouse.cursorposy = var.finaly
else
var.leftpoint = 0
endif
var.xNunchuk = Wiimote.Nunchuk.JoyX * 100
var.yNunchuk = Wiimote.Nunchuk.JoyY * 100
var.xOff = 7
var.yOff = 7
var.nunchukAccX = 19.0
var.Blink = 500ms
var.smooth = 80
var.speed = 1
var.zoom = 1/2
var.deadzone = 40
//
// Analog Movements
//
if var.xNunchuk < -var.xOff then
key.a = true
else key.a = false
endif
if var.yNunchuk < -var.yOff then
key.w = true
else key.w = false
endif
if var.yNunchuk > var.yOff then
key.s = true
else key.s = false
endif
if var.xNunchuk > var.xOff then
key.d = true
else key.d = false
endif
If var.irAmount = 2 Then
var.xPos = (Wiimote.dot1x + Wiimote.dot2x) / 2
var.yPos = (Wiimote.dot1y + Wiimote.dot2y) / 2
Else
var.xPos = Wiimote.dot1x
var.yPos = Wiimote.dot1y
EndIf
If Wiimote.dot1vis Then
var.actualX = (1-(round(var.xPos) / 1024)) * Screen.Width
var.actualY = ((round(var.yPos) / 768)) * Screen.Height
var.speedX = (((var.actualX / (Screen.Width / 2)) - 1) * var.smooth) + var.xOffset
var.speedY = (((var.actualY / (Screen.Height / 2)) - 1) * var.smooth) + var.yOffset
If abs(var.speedX / var.deadzone) > 1 Then var.multX = 1 Else var.multX = abs(var.speedX / var.deadzone)
If abs(var.speedY / var.deadzone) > 1 Then var.multY = 1 Else var.multY = abs(var.speedY / var.deadzone)
If Wiimote.A = True Then
var.speedX = var.speedX * var.zoom
var.speedY = var.speedY * var.zoom
Else
var.speedX = var.speedX * var.speed
var.speedY = var.speedY * var.speed
EndIf
If abs(var.speedX) > 0 Then Mouse.DirectInputX = Mouse.DirectInputX + (var.speedX * var.multX)
If abs(var.speedY) > 0 Then Mouse.DirectInputY = Mouse.DirectInputY + (var.speedY * var.multY)
var.lastX = var.speedX
var.lasty = var.speedY
Else
If abs(var.lastX) > 1 Then Mouse.DirectInputX = Mouse.DirectInputX + var.lastX
If abs(var.lastY) > 1 Then Mouse.DirectInputY = Mouse.DirectInputY + var.lastY
EndIf
// Nunchuck Controls
C = Wiimote.Down // Crouch
If C = True Then
wait 400 ms
If C = True Then
Press Control //Prone
Release Control
EndIf
EndIf
Space = Wiimote.Nunchuk.CButton // Jump
key.Ctrl = Wiimote.Nunchuk.ZButton
// Control Stick Movement
w = Wiimote.Nunchuk.JoyY < -0.4
a = Wiimote.Nunchuk.JoyX < -0.4
s = Wiimote.Nunchuk.JoyY > 0.4
d = Wiimote.Nunchuk.JoyX > 0.4
debug = var.accx + " " + var.accy + " " + var.accz
Ogni script dovrà essere accompagnato da una piccola descrizione e il nome di chi lo ha postato,e scritto in carattere corsivo grandezza 10pt.
Per utilizzare i seguenti script basta seguire l articolo seguente per collegare il wiimote al computer,copiare ed incollare il codice nella finestra di Glove PIE e per ultima cosa cliccare sul tasto RUN.
Ecco infine un articolo da me scritto a proposito di questi scripts e di Glove PIE.
GUITAR HERO III
// Guitar Hero III w/ WiiGuitar
/*
-Use "Default Keyboard/Mouse" config in the game, I said "DEFAULT KEYBOARD/MOUSE"
or you won't be able to use the whammy bar
-As the whammy bar usage could cause problems in windows mouse navigation, it can be turned
ON and OFF with the HOME BUTTON.
notes: -created using brazilian keyboard(ABNT) any problems try to solve(EASY), sorry...
-created using my WiiGuitar Whammy bar calibration, the game may recognize
the motion of the your whammy bar even when is not beeing used, try to calibrate(EXPERT) by
changing the values down there...
-This Whammy bar method is the best i could do, if you know any other method,
let me know.
-The leds on the Wiimote indicates if the Whammy Bar is ON/OFF.
Lights randomly chosen.
Have fun!
by luisfhb
*/
Key.v = Wiimote1.Guitar.Fret1
Key.c = Wiimote1.Guitar.Fret2
Key.x = Wiimote1.Guitar.Fret3
Key.z = Wiimote1.Guitar.Fret4
Key.LeftShift = Wiimote1.Guitar.Fret5
mouse.MiddleButton = Wiimote1.Guitar.Minus
Key.BackSpace = Wiimote1.Guitar.Plus
mouse.RightButton = Wiimote1.Guitar.StrumUp
mouse.LeftButton = Wiimote1.Guitar.StrumDown
//whammy
if wiimote1.Home = 1 and var.whammy = 0 and var.home = 0
var.whammy = 1
var.home = 1
wiimote1.Leds = random(15)+1
endif
if wiimote1.Home = 0 and var.home = 1
var.home = 0
endif
if wiimote1.Home = 1 and var.whammy = 1 and var.home = 0
var.whammy = 0
var.home = 1
wiimote1.Leds = 0
endif
if var.whammy = 1
mouse.DirectInputX = mouse.DirectInputX+ (160*wiimote1.Guitar.WhammyBar-88)/0.32 //if you're wanting to calibrate the whammy bar here you should be changing. "88" is 160*(Whammy bar fully extended) and "0.32" is (Whammy bar fully pressed)-(Whammy bar fully extended)
endif
//starpower
if (Wiimote1.smoothPitch > 40) and var.apertou = 0
mouse.MiddleButton = 1
var.apertou = 1
wait 100ms
mouse.MiddleButton = 0
endif
if wiimote1.smoothpitch < 40
var.apertou = 0
endif
debug = "Whammy bar value: " + wiimote1.Guitar.WhammyBar + " | Use this value to calibrate the Whammy bar. Instructions down in the script"
PACMAN
Up = wiimote.Up
Down = wiimote.Down
Left = wiimote.Left
Right = wiimote.Right
if wiimote.left = true then wiimote.Led1 = 1 else wiimote.led1 = 0;
if wiimote.Up = true then wiimote.Led2 && wiimote.Led3 = 1 else wiimote.Led2 && wiimote.Led3 = 0;
if wiimote.Right = true then wiimote.Led4 = 1 else wiimote.led4 = 0;
Postato da Peppo1616.Questo script è adatto per giocare a pacman online ed inoltre è adatto per tutti quei giochi 2d in cui basta l uso delle frecce direzionali.Piccola funzione aggiuntiva è quella dell illuminazione istantanea dei led quando si spinge il pulsante Up,Left,Right.
WIINDOWS MEDIA PLAYER 11
//Wiimote WMP Control
//Created By Xarath and modified by peppo1616 for wmp11
//Windows Media Player must be the front window while using this! This
//is very basic and is meant for you coding-impared. ;)
//
//Controls:
// Plus - Next Song
// Minus - Previous Song
// Home - Play/Pause
// Left - Volume down
// Right - Volume up
// Up - Speed Up
// Down - Slow down
// A - Normal Speed
// B - No use.
// 1 - Toggle (repeat)
// 2 - FullScreen (schermo intero)
//sostituito f9 da f8 e f10 da f9 rispetto la versione di Xarath
Control && F = Wiimote.Plus
Control && B = Wiimote.Minus
CTRL && P = Wiimote.Home
F8 = Wiimote.Left
F9 = Wiimote.Right
Control && Shift && N = Wiimote.A
Control && Shift && G = Wiimote.Up
Control && Shift && S = Wiimote.Down
Control && T = Wiimote.One
Alt + Enter = Wiimote.Two
Postato da Peppo1616.Questo script originalmente scritto da Xarath è stato modificato da me stesso per renderlo utilizzabile con Wmp11,le funzioni sono descritte nel codice.Funzioni Aggiuntive,Repeat,ripete la canzone appena ascoltata e Full screen nel caso di visualizzazione di video.
FPS UPGRADE Senza IR (testato con Quake3)
// Code for playing FPS Games
// Posted by Kasten and modified by Peppo1616 for using the Nunchuck and Arrows.
/* NOTE for this code to work right with the wiimote please
read the following */
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6
var.xOffset = -3
var.yOffset = -28
var.zOffset = -2
// Change this if you would like your mouse to go faster
var.speed = 10
// change these to a higher number if your hands are not steady or lower if they are
var.xCutoff = 4
var.zCutoff = 4
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
debug = 'X:' + var.xRot + ', ' + 'Y:' + var.yRot + ', ' + 'Z:' + var.zRot
// This is the code that moves your mouse
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot + var.zCutoff)
// Press 1 on the wiimote to press e on the keyboard
e = Wiimote.OneEnter = Wiimote.Two/ B for left click and A for right click
mouse.LeftButton = Wiimote.B
mouse.RightButton = Wiimote.A
// Plus and Minus on the wiimote to use the scroll wheel
// get for scrolling though weapens in fsp games
mouse.WheelUp = Wiimote.Plus
mouse.WheelDown = Wiimote.Minus
// Rumbles wiimote when shift is pressed on your keyboard
Wiimote.Rumble = Shift
// Have some fun and press 1, 2, 3, and/of 4 to little up the lights on the wiimote
Wiimote.Led1 = four
Wiimote.Led2 = three
Wiimote.Led3 = two
Wiimote.Led4 = one
// If you move your controler up and down quickly then it will press space
// Great for jumping on games
if var.yRot >= 100 then space = true else space = false
//added code to use Cbutton and joy to strafe in game with the Nunchuk
//C button on Nunchuk is CTRL on the keyboard;I use this to jump in the game.
Right = 1 > Wiimote1.Nunchuk.JoyX > 0.5
Left = -1 < Wiimote1.Nunchuk.JoyX < -0.5
down = 1 > Wiimote1.Nunchuk.JoyY > 0.5
up = -1 < Wiimote1.Nunchuk.JoyY < -0.5
control = wiimote.Nunchuk.CButton
Postato da Peppo1616.Testato con Quake3 arena,infatti lo script serve per giocare pienamente a giochi
FPS con solo l uso del wiimote.
Tasti:
Link guida
Video guida
FPS Tremulous (utile anche per altri FPS ma non testato)
var.irAmount = 2 // 1 OR 2
Mouse.LeftButton = wiimote.B
Mouse.RightButton = wiimote.A
Mouse.WheelDown = wiimote.Minus
key.tab = wiimote.Home
key.r = wiimote.Right
key.C = wiimote.Down
key.Z = wiimote.Up
key.V = wiimote.Left
Mouse.WheelUp = wiimote.Plus
key.q = wiimote.1
key.e = wiimote.2
var.xtrim = 4
var.ytrim = -30
var.ztrim = 6
var.accx = wiimote.RawForceX + var.xtrim
var.accy = wiimote.RawForceY + var.ytrim
var.accz = wiimote.RawForceZ + var.ztrim
if wiimote.dot1vis and wiimote.dot2vis then
if var.accy > -7 then
var.orientation = 0
elseif var.accy > -45 then
if var.accx < 0 then
var.orientation = 3
else
var.orientation = 1
endif
else
var.orientation = 2
endif
if var.leftpoint = 0 then
if var.orientation = 0 then
if wiimote.dot1x < wiimote.dot2x then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 1 then
if wiimote.dot1y > wiimote.dot2y then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 2 then
if wiimote.dot1x > wiimote.dot2x then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
if var.orientation = 3 then
if wiimote.dot1y < wiimote.dot2y then
var.leftpoint = 1
else
var.leftpoint = 2
endif
endif
endif
if var.leftpoint = 1 then
var.fix1x = wiimote.dot1x
var.fix1y = wiimote.dot1y
var.fix2x = wiimote.dot2x
var.fix2y = wiimote.dot2y
else
var.fix1x = wiimote.dot2x
var.fix1y = wiimote.dot2y
var.fix2x = wiimote.dot1x
var.fix2y = wiimote.dot1y
endif
var.dx = var.fix2x - var.fix1x
var.dy = var.fix2y - var.fix1y
var.cx = (var.fix1x+var.fix2x)/1024.0 - 1
var.cy = (var.fix1y+var.fix2y)/1024.0 - .75
var.d = sqrt(var.dx*var.dx+var.dy*var.dy)
var.dx = var.dx / var.d
var.dy = var.dy / var.d
var.ox = -var.dy*var.cy-var.dx*var.cx;
var.oy = -var.dx*var.cy+var.dy*var.cx;
var.ax = (var.ox * screen.desktopwidth) + (screen.desktopwidth / 2)
var.ay = (-var.oy * screen.desktopwidth) + (screen.desktopheight / 2)
var.dx = var.ax - mouse.cursorposx
var.dy = var.ay - mouse.cursorposy
var.d = sqrt((var.dx*var.dx)+(var.dy*var.dy))
var.a = 180 / (200 + var.d * var.d * var.d * .001)
var.finalx = mouse.cursorposx * var.a + var.ax * (1 - var.a)
var.finaly = mouse.cursorposy * var.a + var.ay * (1 - var.a)
mouse.cursorposx = var.finalx
mouse.cursorposy = var.finaly
else
var.leftpoint = 0
endif
var.xNunchuk = Wiimote.Nunchuk.JoyX * 100
var.yNunchuk = Wiimote.Nunchuk.JoyY * 100
var.xOff = 7
var.yOff = 7
var.nunchukAccX = 19.0
var.Blink = 500ms
var.smooth = 80
var.speed = 1
var.zoom = 1/2
var.deadzone = 40
//
// Analog Movements
//
if var.xNunchuk < -var.xOff then
key.a = true
else key.a = false
endif
if var.yNunchuk < -var.yOff then
key.w = true
else key.w = false
endif
if var.yNunchuk > var.yOff then
key.s = true
else key.s = false
endif
if var.xNunchuk > var.xOff then
key.d = true
else key.d = false
endif
If var.irAmount = 2 Then
var.xPos = (Wiimote.dot1x + Wiimote.dot2x) / 2
var.yPos = (Wiimote.dot1y + Wiimote.dot2y) / 2
Else
var.xPos = Wiimote.dot1x
var.yPos = Wiimote.dot1y
EndIf
If Wiimote.dot1vis Then
var.actualX = (1-(round(var.xPos) / 1024)) * Screen.Width
var.actualY = ((round(var.yPos) / 768)) * Screen.Height
var.speedX = (((var.actualX / (Screen.Width / 2)) - 1) * var.smooth) + var.xOffset
var.speedY = (((var.actualY / (Screen.Height / 2)) - 1) * var.smooth) + var.yOffset
If abs(var.speedX / var.deadzone) > 1 Then var.multX = 1 Else var.multX = abs(var.speedX / var.deadzone)
If abs(var.speedY / var.deadzone) > 1 Then var.multY = 1 Else var.multY = abs(var.speedY / var.deadzone)
If Wiimote.A = True Then
var.speedX = var.speedX * var.zoom
var.speedY = var.speedY * var.zoom
Else
var.speedX = var.speedX * var.speed
var.speedY = var.speedY * var.speed
EndIf
If abs(var.speedX) > 0 Then Mouse.DirectInputX = Mouse.DirectInputX + (var.speedX * var.multX)
If abs(var.speedY) > 0 Then Mouse.DirectInputY = Mouse.DirectInputY + (var.speedY * var.multY)
var.lastX = var.speedX
var.lasty = var.speedY
Else
If abs(var.lastX) > 1 Then Mouse.DirectInputX = Mouse.DirectInputX + var.lastX
If abs(var.lastY) > 1 Then Mouse.DirectInputY = Mouse.DirectInputY + var.lastY
EndIf
// Nunchuck Controls
C = Wiimote.Down // Crouch
If C = True Then
wait 400 ms
If C = True Then
Press Control //Prone
Release Control
EndIf
EndIf
Space = Wiimote.Nunchuk.CButton // Jump
key.Ctrl = Wiimote.Nunchuk.ZButton
// Control Stick Movement
w = Wiimote.Nunchuk.JoyY < -0.4
a = Wiimote.Nunchuk.JoyX < -0.4
s = Wiimote.Nunchuk.JoyY > 0.4
d = Wiimote.Nunchuk.JoyX > 0.4
debug = var.accx + " " + var.accy + " " + var.accz
|
Latest page update: made by
Anonymous
, Jul 24 2008, 6:40 AM EDT
(about this update
About This Update
Script added: For using the WiiGuitar with the Guitar Hero III PC
- anonymous
312 words added view changes - complete history) |
|
More Info: links to this page
|