 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
chaotictails
Joined: 22 Feb 2008 Posts: 1
Digg It |
Posted: Sat Apr 26, 2008 7:48 pm Post subject: Kirby Tilt n Tumble Script |
|
|
I'm trying to make a Kirby Tilt and Tumble Script for VisualBoy Advance, but I'm yet to prevail. So far I have:
| Code: |
// Kirby Tilt 'n' Tumble in VisualBoy Advance
Wiimote.Leds = 12
Key.Space = Wiimote.Minus
Key.Z = Wiimote.Two
Key.Enter = Wiimote.Plus
//Button Control
/*
Key.NUMPAD4 = Wiimote.Up
Key.NUMPAD8 = Wiimote.Right
Key.NUMPAD2 = Wiimote.Left
Key.NUMPAD6 = Wiimote.Down
If Wiimote.One
Key.NUMPAD8 = true
wait 300ms
Key.NUMPAD8 = false
Key.NUMPAD2 = true
wait 100ms
Key.NUMPAD2 = false
Wait 100ms
Endif
*/
//Tilt Control
Up = Wiimote.Right
Down = Wiimote.Left
Left = Wiimote.Up
Right = Wiimote.Down
If Wiimote.Pitch <= -20 and Wiimote.Roll <20 and Wiimote.Roll >-20
Debug = "Left"
Key.NUMPAD4 = true
Key.NUMPAD8 = false
Key.NUMPAD2 = false
Key.NUMPAD6 = false
Endif
If Wiimote.Pitch >= 20
Debug = "Right"
Key.NUMPAD6 = true
Key.NUMPAD8 = false
Key.NUMPAD2 = false
Key.NUMPAD4 = false
Endif
If Wiimote.Roll >= 20
Debug = "Up"
Key.NUMPAD8 = true
Key.NUMPAD2 = false
Key.NUMPAD4 = false
Key.NUMPAD6 = false
Endif
If Wiimote.Roll <= -20
Debug = "Down"
Key.NUMPAD2 = true
Key.NUMPAD8 = false
Key.NUMPAD4 = false
Key.NUMPAD6 = false
Endif
If Wiimote.Pitch <20 and Wiimote.Pitch >-20 and Wiimote.Roll <20 and Wiimote.Roll >-20
Debug = "Neutral"
Key.NUMPAD8 = false
Key.NUMPAD2 = false
Key.NUMPAD4 = false
Key.NUMPAD6 = false
Endif
|
But this only supports Direct Up, Down, Left, and Right. I'm not sure how to incorporate diagonal directions. The button control works pretty good though. |
|
| Back to top |
|
 |
sanderevers
Joined: 01 May 2008 Posts: 1
Digg It |
Posted: Thu May 01, 2008 10:00 pm Post subject: |
|
|
I made a script which (sort of) uses the Wii Wheel.
| Code: | //MicroSE GlovePie script for the official Wii Wheel.
//Supports 2 schemes (and 3 other modes). Press the A, B and Down button (DPAD) and choose your mode with + and -.
//Mode 1: Exact turn the wheel to control the X value.
//Mode 2: Simple, turn the wheel in any direction to set the max of that direction.
//Mode 3. (Home button) Stop the script.
//Mode 4: (One button) Show glovePie.
//Mode 5: (Two button) Hide glovePie.
//PPJoy config:
//Axes: 6 (X, Y, Z, Z Rotation, Slider, Slider)
//Buttons: 11 (Digital0/Digital10)
//POV hats: 2. (Digital11/Digital14)
//Quit if an expansion is found.
if Wiimote1.Expansion != 0 then
ShowPie
ExitScript
end if
//Set the center/reset value of the wheel. (Default = 0.3) set it to 0 if you wish to disable it.
var.pitch_reset = 0.3
if HeldDown(Wiimote1.B, 500 ms) && HeldDown(Wiimote1.A, 500 ms) && HeldDown(Wiimote1.Down, 500 ms) then
//Change the mode.
Wiimote1.Led3 = false
Wiimote1.Led4 = false
if Pressed(Wiimote1.Minus)then
//Mode one: precize
var.mode = true
Wiimote1.Led1 = false
Wiimote1.Led2 = true
elseif Pressed(Wiimote1.Plus) then
//Mode two: simple
var.mode = false
Wiimote1.Led1 = true
Wiimote1.Led2 = false
elseif Pressed(Wiimote1.Home) then
//Mode three: off.
ShowPie
ExitScript
elseif Pressed(Wiimote1.One) then
//Mode four: Show Pie.
ShowPie
FlashPieWindow
elseif Pressed(Wiimote1.Two) then
//Mode five: Hide Pie.
HidePie
end if
else
//Turn the wheel (steering)
var.sp = (wiimote.RawForceZ) / 20
if var.mode then
//Set the led lights
Wiimote1.Led1 = true
Wiimote1.Led2 = false
Wiimote1.Led3 = false
Wiimote1.Led4 = true
//Calculate the turn pitch
if var.sp < -var.pitch_reset then
//Left
var.Analog0 = -1
elseif var.sp > var.pitch_reset then
//Right
var.Analog0 = 1
else
//No pitch, so reset.
var.Analog0 = 0
end if
else
//et the led lights
Wiimote1.Led1 = false
Wiimote1.Led2 = true
Wiimote1.Led3 = true
Wiimote1.Led4 = false
//Calculate the turn pitch
if var.sp < -var.pitch_reset or var.sp > var.pitch_reset then
//Left or right
var.Analog0 = var.sp
else
//No pitch, so reset.
var.Analog0 = 0
end if
end if
//Set the value.
PPJoy1.Analog0 = var.Analog0
//Set the POV buttons
PPJoy1.Digital11 = Wiimote1.Right //Right = Up
PPJoy1.Digital12 = Wiimote1.Down //Down = Left
PPJoy1.Digital13 = Wiimote1.Up //Up = Right
PPJoy1.Digital14 = Wiimote1.Left //Left = Down
//The remaining buttons
PPJoy1.Digital0 = Wiimote1.A //The A button
PPJoy1.Digital1 = Wiimote1.B //The B button
PPJoy1.Digital2 = Wiimote1.One //The One Button
PPJoy1.Digital3 = Wiimote1.Two //The Two Button
PPJoy1.Digital4 = Wiimote1.Minus //The Minus Button
PPJoy1.Digital5 = Wiimote1.Plus //The Plus Button
PPJoy1.Digital6 = Wiimote1.Home //The Home Button
//You can create a special mapping for PPJoy if you wish.
//1 Axis (X), 7 buttons, 2 POV hats. If you do so, then disable the code below.
//Reset all other values.
PPJoy1.Analog1 = 0
PPJoy1.Analog2 = 0
PPJoy1.Analog3 = 0
PPJoy1.Analog4 = 0
PPJoy1.Analog5 = 0
PPJoy1.Digital7 = false
PPJoy1.Digital8 = false
PPJoy1.Digital9 = false
PPJoy1.Digital10 = false
end if |
|
|
| Back to top |
|
 |
kuradon
Joined: 16 Mar 2008 Posts: 1 Location: Japan
Digg It |
Posted: Sun May 11, 2008 4:05 am Post subject: |
|
|
My Wiiboard script.
| Code: |
//
// The Balance Board Walker 1.0 by kuradon
//
// Usage:
// 1. Start script and wait for detect balance board.
// 2. Press balance board button to calibrate.
// 3. Stand on the board straight while message "Neutral" display.
// 4. Now, you can control cursor key and left mouse button.
//
// Control:
// Walking on the board: Up cursor
// Continuous Left: Left cursor
// Continuous Right: Right cursor
// Continuous Back: Down cursor
// Continuous Front: Left click
// Blance Board button: Calibrate and Center mouse cursor
//
//
//
// Initialize section:
// Detect first balance board.
// Read Factory Calibration Values.
//
if var.BalanceID = 0 then
if Wiimote1.HasBalanceBoard then
var.BalanceID = 1
Wiimote1.BalanceBoard.LED = true
// dummy reading value
var.AA = ( WiimotePeek(1, 0x04A40024) shl 8 ) + WiimotePeek(1, 0x04A40025)
// first reading returns FF only
var.A0 = ( WiimotePeek(1, 0x04A40024) shl 8 ) + WiimotePeek(1, 0x04A40025)
var.B0 = ( WiimotePeek(1, 0x04A40026) shl 8 ) + WiimotePeek(1, 0x04A40027)
var.C0 = ( WiimotePeek(1, 0x04A40028) shl 8 ) + WiimotePeek(1, 0x04A40029)
var.D0 = ( WiimotePeek(1, 0x04A4002A) shl 8 ) + WiimotePeek(1, 0x04A4002B)
var.A1 = ( WiimotePeek(1, 0x04A4002C) shl 8 ) + WiimotePeek(1, 0x04A4002D)
var.B1 = ( WiimotePeek(1, 0x04A4002E) shl 8 ) + WiimotePeek(1, 0x04A4002F)
var.C1 = ( WiimotePeek(1, 0x04A40030) shl 8 ) + WiimotePeek(1, 0x04A40031)
var.D1 = ( WiimotePeek(1, 0x04A40032) shl 8 ) + WiimotePeek(1, 0x04A40033)
var.A2 = ( WiimotePeek(1, 0x04A40034) shl 8 ) + WiimotePeek(1, 0x04A40035)
var.B2 = ( WiimotePeek(1, 0x04A40036) shl 8 ) + WiimotePeek(1, 0x04A40037)
var.C2 = ( WiimotePeek(1, 0x04A40038) shl 8 ) + WiimotePeek(1, 0x04A40039)
var.D2 = ( WiimotePeek(1, 0x04A4003A) shl 8 ) + WiimotePeek(1, 0x04A4003B)
elseif Wiimote2.HasBalanceBoard then
var.BalanceID = 2
Wiimote2.BalanceBoard.LED = true
// dummy reading value
var.AA = ( WiimotePeek(2, 0x04A40024) shl 8 ) + WiimotePeek(2, 0x04A40025)
// first reading returns FF only
var.A0 = ( WiimotePeek(2, 0x04A40024) shl 8 ) + WiimotePeek(2, 0x04A40025)
var.B0 = ( WiimotePeek(2, 0x04A40026) shl 8 ) + WiimotePeek(2, 0x04A40027)
var.C0 = ( WiimotePeek(2, 0x04A40028) shl 8 ) + WiimotePeek(2, 0x04A40029)
var.D0 = ( WiimotePeek(2, 0x04A4002A) shl 8 ) + WiimotePeek(2, 0x04A4002B)
var.A1 = ( WiimotePeek(2, 0x04A4002C) shl 8 ) + WiimotePeek(2, 0x04A4002D)
var.B1 = ( WiimotePeek(2, 0x04A4002E) shl 8 ) + WiimotePeek(2, 0x04A4002F)
var.C1 = ( WiimotePeek(2, 0x04A40030) shl 8 ) + WiimotePeek(2, 0x04A40031)
var.D1 = ( WiimotePeek(2, 0x04A40032) shl 8 ) + WiimotePeek(2, 0x04A40033)
var.A2 = ( WiimotePeek(2, 0x04A40034) shl 8 ) + WiimotePeek(2, 0x04A40035)
var.B2 = ( WiimotePeek(2, 0x04A40036) shl 8 ) + WiimotePeek(2, 0x04A40037)
var.C2 = ( WiimotePeek(2, 0x04A40038) shl 8 ) + WiimotePeek(2, 0x04A40039)
var.D2 = ( WiimotePeek(2, 0x04A4003A) shl 8 ) + WiimotePeek(2, 0x04A4003B)
elseif Wiimote3.HasBalanceBoard then
var.BalanceID = 3
Wiimote3.BalanceBoard.LED = true
// dummy reading value
var.AA = ( WiimotePeek(3, 0x04A40024) shl 8 ) + WiimotePeek(3, 0x04A40025)
// first reading returns FF only
var.A0 = ( WiimotePeek(3, 0x04A40024) shl 8 ) + WiimotePeek(3, 0x04A40025)
var.B0 = ( WiimotePeek(3, 0x04A40026) shl 8 ) + WiimotePeek(3, 0x04A40027)
var.C0 = ( WiimotePeek(3, 0x04A40028) shl 8 ) + WiimotePeek(3, 0x04A40029)
var.D0 = ( WiimotePeek(3, 0x04A4002A) shl 8 ) + WiimotePeek(3, 0x04A4002B)
var.A1 = ( WiimotePeek(3, 0x04A4002C) shl 8 ) + WiimotePeek(3, 0x04A4002D)
var.B1 = ( WiimotePeek(3, 0x04A4002E) shl 8 ) + WiimotePeek(3, 0x04A4002F)
var.C1 = ( WiimotePeek(3, 0x04A40030) shl 8 ) + WiimotePeek(3, 0x04A40031)
var.D1 = ( WiimotePeek(3, 0x04A40032) shl 8 ) + WiimotePeek(3, 0x04A40033)
var.A2 = ( WiimotePeek(3, 0x04A40034) shl 8 ) + WiimotePeek(3, 0x04A40035)
var.B2 = ( WiimotePeek(3, 0x04A40036) shl 8 ) + WiimotePeek(3, 0x04A40037)
var.C2 = ( WiimotePeek(3, 0x04A40038) shl 8 ) + WiimotePeek(3, 0x04A40039)
var.D2 = ( WiimotePeek(3, 0x04A4003A) shl 8 ) + WiimotePeek(3, 0x04A4003B)
elseif Wiimote4.HasBalanceBoard then
var.BalanceID = 4
Wiimote4.BalanceBoard.LED = true
// dummy reading value
var.AA = ( WiimotePeek(4, 0x04A40024) shl 8 ) + WiimotePeek(4, 0x04A40025)
// first reading returns FF only
var.A0 = ( WiimotePeek(4, 0x04A40024) shl 8 ) + WiimotePeek(4, 0x04A40025)
var.B0 = ( WiimotePeek(4, 0x04A40026) shl 8 ) + WiimotePeek(4, 0x04A40027)
var.C0 = ( WiimotePeek(4, 0x04A40028) shl 8 ) + WiimotePeek(4, 0x04A40029)
var.D0 = ( WiimotePeek(4, 0x04A4002A) shl 8 ) + WiimotePeek(4, 0x04A4002B)
var.A1 = ( WiimotePeek(4, 0x04A4002C) shl 8 ) + WiimotePeek(4, 0x04A4002D)
var.B1 = ( WiimotePeek(4, 0x04A4002E) shl 8 ) + WiimotePeek(4, 0x04A4002F)
var.C1 = ( WiimotePeek(4, 0x04A40030) shl 8 ) + WiimotePeek(4, 0x04A40031)
var.D1 = ( WiimotePeek(4, 0x04A40032) shl 8 ) + WiimotePeek(4, 0x04A40033)
var.A2 = ( WiimotePeek(4, 0x04A40034) shl 8 ) + WiimotePeek(4, 0x04A40035)
var.B2 = ( WiimotePeek(4, 0x04A40036) shl 8 ) + WiimotePeek(4, 0x04A40037)
var.C2 = ( WiimotePeek(4, 0x04A40038) shl 8 ) + WiimotePeek(4, 0x04A40039)
var.D2 = ( WiimotePeek(4, 0x04A4003A) shl 8 ) + WiimotePeek(4, 0x04A4003B)
endif
else
//
// Actual procedure
//
// Reading sensor.
if var.BalanceID = 1 then
var.P0A = Wiimote1.BalanceBoard.RawFrontRight
var.P0B = Wiimote1.BalanceBoard.RawFrontLeft
var.P0C = Wiimote1.BalanceBoard.RawBackRight
var.P0D = Wiimote1.BalanceBoard.RawBackLeft
elseif var.BalanceID = 2 then
var.P0A = Wiimote2.BalanceBoard.RawFrontRight
var.P0B = Wiimote2.BalanceBoard.RawFrontLeft
var.P0C = Wiimote2.BalanceBoard.RawBackRight
var.P0D = Wiimote2.BalanceBoard.RawBackLeft
elseif var.BalanceID = 3 then
var.P0A = Wiimote3.BalanceBoard.RawFrontRight
var.P0B = Wiimote3.BalanceBoard.RawFrontLeft
var.P0C = Wiimote3.BalanceBoard.RawBackRight
var.P0D = Wiimote3.BalanceBoard.RawBackLeft
elseif var.BalanceID = 4 then
var.P0A = Wiimote2.BalanceBoard.RawFrontRight
var.P0B = Wiimote2.BalanceBoard.RawFrontLeft
var.P0C = Wiimote2.BalanceBoard.RawBackRight
var.P0D = Wiimote2.BalanceBoard.RawBackLeft
endif
// Calculate weight on each sensor.
if var.P0A < var.A1 then
var.P1A = 68 * (var.P0A - var.A0) / (var.A1 - var.A0)
else
var.P1A = 68 * (var.P0A - var.A1) / (var.A2 - var.A1) + 68
endif
if var.P0B < var.B1 then
var.P1B = 68 * (var.P0B - var.B0) / (var.B1 - var.B0)
else
var.P1B = 68 * (var.P0B - var.B1) / (var.B2 - var.B1) + 68
endif
if var.P0C < var.C1 then
var.P1C = 68 * (var.P0C - var.C0) / (var.C1 - var.C0)
else
var.P1C = 68 * (var.P0C - var.C1) / (var.C2 - var.C1) + 68
endif
if var.P0D < var.D1 then
var.P1D = 68 * (var.P0D - var.D0) / (var.D1 - var.D0)
else
var.P1D = 68 * (var.P0D - var.D1) / (var.D2 - var.D1) + 68
endif
//
// Balance Board Button: Reset ZERO Calibration Values and start walking.
//
if Wiimote1.BalanceBoard.Button or Wiimote2.BalanceBoard.Button or Wiimote3.BalanceBoard.Button or Wiimote4.BalanceBoard.Button then
var.C1A = var.P1A
var.C1B = var.P1B
var.C1C = var.P1C
var.C1D = var.P1D
var.starting = true
var.leftframe = 0
var.rightframe = 0
var.neutralframe = 0
Mouse.X = 0.5
Mouse.Y = 0.5
endif
// Calibrate weight.
var.P1A = var.P1A - var.C1A
var.P1B = var.P1B - var.C1B
var.P1C = var.P1C - var.C1C
var.P1D = var.P1D - var.C1D
//
// GlovePIE 0.30 reads wrong: B=FrontLeft C=BackRight, correct: B=BackRight C=FrontLeft.
//
var.WeightLeft = var.P1C + var.P1D
var.WeightRight = var.P1A + var.P1B
var.WeightFront = var.P1A + var.P1C
var.WeightBack = var.P1B + var.P1D
var.WeightHalf = ( var.P1A + var.P1B + var.P1C + var.P1D ) / 2
var.WeightBalanceX = ( var.WeightRight / var.WeightHalf ) -1
var.WeightBalanceY = ( var.WeightFront / var.WeightHalf ) -1
var.BalanceX = DeadZone( var.WeightBalanceX , 0.1 )
var.BalanceY = DeadZone( var.WeightBalanceY , 0.1 )
//
// Walking detection.
//
// variables:
// starting = if pressed button
// startcount = if stand stable or not
// neutralframe = count continuous standing neutral position
// leftframe = count continuous standing left position
// rightframe = count continuous standing right position
//
// After press button.
if var.starting = true then
// Near ZERO weight don't match for sampling.
if var.WeightHalf > 10 then
// Check Left/Right Balance.
if var.WeightBalanceX < -0.25 then
var.leftframe++
var.rightframe = 0
var.neutralframe = 0
if var.startcount = true then
if var.leftframe = 3 then
display "LEFT FORWARD"
key.UP = true
wait 50ms
key.UP = false
elseif var.leftframe > 30 then
display "LEFT LEFT"
key.LEFT = true
wait 50ms
key.LEFT = false
var.leftframe = 15
endif
endif
elseif var.WeightBalanceX > 0.25 then
var.leftframe = 0
var.rightframe++
var.neutralframe = 0
if var.startcount = true then
if var.rightframe = 3 then
display "RIGHT FORWARD"
key.UP = true
wait 50ms
key.UP = false
elseif var.rightframe > 30 then
display "RIGHT RIGHT"
key.RIGHT = true
wait 50ms
key.RIGHT = false
var.rightframe = 15
endif
endif
else
var.leftframe = 0
var.rightframe = 0
var.neutralframe++
if var.neutralframe = 5 then
var.startcount = true
display "Neutral"
elseif var.neutralframe > 20 then
if var.BalanceY > 0.4 then
display "Neutral click"
Mouse.LeftButton = true
wait 50ms
Mouse.LeftButton = false
elseif var.BalanceY < -0.4 then
display "Neutral back"
key.DOWN = true
wait 50ms
key.DOWN = false
endif
var.neutralframe = 4
endif
endif
else
var.leftframe = 0
var.rightframe = 0
var.neutralframe = 0
var.startcount = false
display "Stand straight on the board to walk."
endif
else
display "Balance Board ID:" + var.BalanceID + " Press Button to start."
endif
endif
|
|
|
| Back to top |
|
 |
Olly
Joined: 04 Apr 2008 Posts: 5 Location: Sutton Coldfield, Birmingham
Digg It |
Posted: Mon May 12, 2008 12:32 pm Post subject: |
|
|
I was thinking of making a simple script for Windows Vista Media Center (without IR). So you don't have to spend £50 on a ridiculously overpriced Media Center remote.
Anyone know whether one has been made yet? _________________ Wiimote Mods wanted for:
- Half-Life 2
- BioShock
- GTA 3, Vice City, Liberty City Stories
- Oblivion |
|
| Back to top |
|
 |
anderpiffer
Joined: 20 Apr 2007 Posts: 8
Digg It |
Posted: Tue May 13, 2008 5:04 am Post subject: |
|
|
I have a suggestion for the topic.
Someone could organize every scripts and list in the 1st post of the topic. It would be much more easier to find a script.
I would do that but the author of the topic has the 1st post.  |
|
| Back to top |
|
 |
SteelRaven7
Joined: 16 May 2008 Posts: 4 Location: Behind you!
Digg It |
Posted: Fri May 16, 2008 11:23 am Post subject: |
|
|
I made a script for a guitar hero 3 controller, it uses the midi in glovepie. You play the first five notes in a scale with the frets + strum down, and the rest with frets + strum up. The rumble function will make the guitar rumble everytime you strum a note. You can also use the whammybar to pitch the sounds. Plus and minus will change instruments.
| Code: |
/* Guitar made by SteelRaven7 Aka Johan Hassel 2008
Controls: Use the frets + strum down / up to play.
Plus and Minus changes the instrument, it will also be displayed in the debug tab.
Use the whammy bar to pitch your sound up or down.
Change the var.rumbletime to edit the time the guitar will rumble when you strum.
To calibrate the whammy, play around with the var.whammymul and var.whammysub below.
A calibrated whammy should output 0.00 in resting position, and -0.50 while being pushed.
The whammy calibration works like: (whammy output) * whammymul - whammysub
*/
//Settings:
var.whammymul = 1.5
var.whammysub = 1.51
var.rumbletime = 120
if var.once = 0 then
var.instrument = 39
var.once = 1
endif
//Fret controls:
If Wiimote.Guitar.Fret1 = 1 then
If pressed (Wiimote.Guitar.StrumDown) then
midi.c3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
if pressed (Wiimote.Guitar.StrumUp) then
midi.a3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
Wiimote.Led1 = 1
else
Wiimote.Led1 = 0
midi.c3 = 0
midi.a3 = 0
endif
If Wiimote.Guitar.Fret2 = 1 then
If pressed (Wiimote.Guitar.StrumDown) then
midi.d3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
if pressed (Wiimote.Guitar.StrumUp) then
midi.b3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
Wiimote.Led2 = 1
else
Wiimote.Led2 = 0
midi.d3 = 0
midi.b3 = 0
endif
If Wiimote.Guitar.Fret3 = 1 then
If pressed (Wiimote.Guitar.StrumDown) then
midi.e3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
if pressed (Wiimote.Guitar.StrumUp) then
midi.c4 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
Wiimote.Led3 = 1
else
Wiimote.Led3 = 0
midi.e3 = 0
midi.c4 = 0
endif
If Wiimote.Guitar.Fret4 = 1 then
If pressed (Wiimote.Guitar.StrumDown) then
midi.f3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
if pressed (Wiimote.Guitar.StrumUp) then
midi.d4 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
Wiimote.Led4 = 1
else
Wiimote.Led4 = 0
midi.f3 = 0
midi.d4 = 0
endif
If Wiimote.Guitar.Fret5 = 1 then
If pressed (Wiimote.Guitar.StrumDown) then
midi.g3 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
if pressed (Wiimote.Guitar.StrumUp) then
midi.e4 = 1
Wiimote.Rumble = 1
Wait var.rumbletime ms
Wiimote.Rumble = 0
endif
else
midi.g3 = 0
midi.e4 = 0
endif
//Whammy bar:
midi.PitchWheel = (0 - Wiimote.Guitar.WhammyBar + 1.52) * var.whammymul - var.whammysub
midi.Instrument = var.instrument
if pressed (Wiimote.Plus) then
var.instrument ++
elseif pressed (Wiimote.Minus) then
var.instrument --
endif
//debug:
debug = "instrument id: " + var.instrument + ". whammybar: " + ((0 - Wiimote.Guitar.WhammyBar + 1.52) * var.whammymul - var.whammysub)
|
|
|
| Back to top |
|
 |
StDaDr
Joined: 29 May 2008 Posts: 1
Digg It |
Posted: Thu May 29, 2008 11:13 am Post subject: |
|
|
My first Script :p
| Code: |
/* Windows Media Player Script by StDaDr
Here is my Script for the Media Player:
Play/Pause = B
Previous/Next = Left/Right
Volume Up/Down (Media Player) = Up/Down
Volume Up/Down (System) = Plus/Minus
Normal Mode = One
Design Mode = Two
Fullscreen = One and Two
End Player = Home (Press 3s)*/
Key.Control && F = Wiimote.right //Next
Key.Control && B = Wiimote.left //Previous
Key.Play = Wiimote.B //Play
Key.F9 = Wiimote.Up //Volume Up (Media Player)
Key.F8 = Wiimote.Down //Volume Down (Media Player)
Key.VolumeUp = Wiimote.Plus //Volume Up (System)
Key.VolumeDown = Wiimote.Minus //Volume Down (System)
If (Wiimote.One and Wiimote.Two) then //Fullscreen
Key.Alt && Key.Enter = true
else Key.Alt && Key.Enter = false
wait 100ms
If (Wiimote.One and not (Wiimote.Two)) then //Normal Mode
Key.Control && Key.One = true
Key.Control && Key.Two = false
elseIf (Wiimote.Two and not (Wiimote.One)) then //Design Mode
Key.Control && Key.One = false
Key.Control && Key.Two = true
else
Key.Control && Key.One = false
Key.Control && Key.Two = false
end if
end if
If Wiimote.Home = true //End Player
wait 3s
If Wiimote.Home = true
Key.Alt && Key.F4 = true
wait 1ms
Key.Alt && Key.F4 = false
end if
end if
If Wiimote.Right //LED
wiimote.Leds = 1
Wait 50ms
wiimote.leds = 3
Wait 50ms
wiimote.leds = 7
Wait 50ms
wiimote.leds = 15
Wait 50ms
wiimote.Leds = 0
wait 500ms
End If
If Wiimote.left //LED
wiimote.Leds = 8
Wait 50ms
wiimote.leds = 12
Wait 50ms
wiimote.leds = 14
Wait 50ms
wiimote.leds = 15
Wait 50ms
wiimote.Leds = 0
wait 500ms
End If
If Wiimote.Plus or Wiimote.Up //LED
wiimote.Leds = 6
wait 100ms
wiimote.Leds = 15
wait 100ms
wiimote.leds = 0
wait 500ms
end if
If Wiimote.Minus or Wiimote.Down //LED
wiimote.Leds = 15
wait 100ms
wiimote.Leds = 6
wait 100ms
wiimote.leds = 0
wait 500ms
end if
If Wiimote.B //LED
wiimote.Leds = 15
wait 100ms
wiimote.Leds = 0
wait 100 ms
end if
If Wiimote.B //Rumble
wiimote.Rumble = 1
wait 200ms
wiimote.Rumble = 0
wait 500ms
end if
|
|
|
| Back to top |
|
 |
|
|
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
|