/*
// Guitar Hero PC @ Les Paul WiiGuitar HeroMode powered!!!
// Version 1.0
// Written by DerFlash based on some other Guitar Hero Scripts
// derflash[dot]de
//
// Hero Mode: Hold down "Plus" & "Minus" and kick the whammy bar (tremolo) once to enable/disable hero mode
// While in Hero Mode you wiimote rumble's every strum and also flashes the leds ;-)
*/
var.found = "";
if WiiGuitar.Exists then var.found += "Guitar@Wiimote";
if var.found == "" then {
var.found = "No Guitar found - ";
}
if var.HeroMode then var.found += "@HeroMode";
var.found += (" - Battery: " + WiiMote.Battery) + "% - ";
// Debug
var.dummy = Wiimote.RawForceX
if WiiGuitar.Green then var.G = "Green" else var.G = ""
if WiiGuitar.Red then var.R = "Red" else var.R = ""
if WiiGuitar.Yellow then var.Y = "Yellow" else var.Y = ""
if WiiGuitar.Blue then var.B = "Blue" else var.B = ""
if WiiGuitar.Orange then var.O = "Orange" else var.O= ""
if WiiGuitar.Minus then var.Minus = "-" else var.Minus = ""
if WiiGuitar.Plus then var.Plus = "+" else var.Plus = ""
if WiiGuitar.StrumUp then var.Strum = "StrumUp" elseif WiiGuitar.StrumDown then var.Strum = "StrumDown" else var.Strum = ""
debug = var.found+"Frets: "+var.G+var.R+var.Y+var.B+var.O+var.Minus+var.Plus+"; Strum: "+var.Strum+"; Whammy:"+Wiimote.Classic.R+var.RF+"; Tilt=" + Wiimote.RawForceZ+"; Joystick: X = "+Wiimote.Classic.Joy1X+", Y = "+Wiimote.Classic.Joy1Y;
/*
---BUTTON MAPPING to Keyboard and Mouse--
Configuration:
Green - V
Red - C
Yellow - X
Blue - Z
Orange - Left Shift
Strum Up - Left Mouse Button
Strum Down - Right Mouse Button
Minus - Middle Mouse Button
Plus - Escape
Tilt - Middle Mouse Button
Whammy - Right Alt
Joystick Up - Up
Joystick Down - Down
Joystick Right - Right
Joystick Left - Left
*/
// Guitar Joystick
Key.Left = (-1.2 < WiiGuitar.JoyX < -0.5) // Joystick moving Left = minus X axis
Key.Right = (0.5 < WiiGuitar.JoyX < 1.2) // Joystick moving Right = positive X axis
Key.Up = (-1.2 < WiiGuitar.JoyY < -0.5) // Joystick moving Up = negative Y axis
Key.Down = (0.5 < WiiGuitar.JoyY < 1.2) // Joystick moving Down = positive Y axis
// Fret Buttons
Key.V = WiiGuitar.Green //Green
Key.C = WiiGuitar.Red //Red
Key.X = WiiGuitar.Yellow //Yellow
Key.Z = WiiGuitar.Blue //Blue
Key.LeftShift = WiiGuitar.Orange //Orange
// Plus and Minus Buttons
Mouse.MiddleButton = WiiGuitar.Minus //Star Power
Key.Escape = WiiGuitar.Plus //Menu / Pause
// Strum Bar
Mouse.LeftButton = WiiGuitar.StrumDown
Mouse.RightButton = WiiGuitar.StrumUp
Key.RightAlt = (0.6 < WiiGuitar.WhammyBar < 0.9)
//Mouse.DirectInputX = WiiGuitar.WhammyBar * 1500 // you can also use this line instead of the one above if you want to use the mouse-whammy
// Star Power
Mouse.MiddleButton = (20 < Wiimote.RawForceZ < 100)
// Turn on Players Led's
if !var.hmChange
Wiimote1.Leds = 1;
Wiimote2.Leds = 2;
Wiimote3.Leds = 4;
Wiimote4.Leds = 8;
endif
//////////// HEROMODE ///////////////
if !var.hmChange // get rid of the on-off-stuttering
// deactivating HeroMode
if var.HeroMode then
if WiiGuitar.Plus && WiiGuitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9)
var.hmChange = true;
var.HeroMode = false;
wiimote.Leds = 15
wait 100 ms
wiimote.Leds = 7
wait 100 ms
wiimote.Leds = 3
wait 100 ms
wiimote.Leds = 1
wait 1000 ms;
var.hmChange = false;
endif
// activating HeroMode
else
if WiiGuitar.Plus && WiiGuitar.Minus && (0.6 < WiiGuitar.WhammyBar < 0.9)
var.hmChange = true;
var.HeroMode = true;
wiimote.Leds = 1
wait 100 ms
wiimote.Leds = 3
wait 100 ms
wiimote.Leds = 7
wait 100 ms
wiimote.Leds = 15
wait 1000 ms;
wiimote.Speaker = false;
var.hmChange = false;
endif
endif
endif
// if Hero Mode active
if var.HeroMode = true
Wiimote.Rumble = WiiGuitar.StrumUp || WiiGuitar.StrumDown;
if WiiGuitar.StrumUp || WiiGuitar.StrumDown
wiimote.Leds = 1
wait 50 ms
wiimote.Leds = 3
wait 50 ms
wiimote.Leds = 7
wait 50 ms
wiimote.Leds = 15
endif
endif;
//END OF FILE