/*------------------------------------------------------------------------------ Sonic the Hedgehog 4: Episode II - Wiimote Script By: Bighead - http://bhemuhelp.co.nf/ - bighead.0@gmail.com Supports: Wiimote, Wiimote + Nunchuk, Classic Controller Maps To: Keyboard -------------------------------------------------------------------------------- NOTE: DO NOT PLUG or UNPLUG EXTENSIONS WHILE THE SCRIPT IS RUNNING or KEYBOARD ARROW KEY INPUTS WILL GET STUCK. THIS WILL MAKE IT HARDER TO STOP THE SCRIPT. -------------------------------------------------------------------------------- Wiimote Controls: +------------------+--------------------+-------------------------+ | Action | Button | Mapped From | +------------------+--------------------+-------------------------+ | Movement | D-Pad | Keyboard W/A/S/D | | Jump/Back | 1 | Keyboard K | | Jump/Select | 2 | Keyboard J | | Start | + | Keyboard Enter | | Super Sonic | - | Keyboard I | | Tag Actions | A | Keyboard U | | Call | B | Keyboard P | | View Profile | Home | Keyboard 1 | | Select Zone L | Left | Keyboard Q | | Select Zone R | Right | Keyboard O | +------------------+--------------------+-------------------------+ Wiimote + Nunchuk Controls: +------------------+--------------------+-------------------------+ | Action | Button | Mapped From | +------------------+--------------------+-------------------------+ | Movement | Analog | Keyboard W/A/S/D | | Jump/Back | B | Keyboard K | | Jump/Select | A | Keyboard J | | Start | + | Keyboard Enter | | Super Sonic | - | Keyboard I | | Tag Actions | Z | Keyboard U | | Call | C | Keyboard P | | View Profile | 1 | Keyboard 1 | | Select Zone L | Left | Keyboard Q | | Select Zone R | Right | Keyboard O | +------------------+--------------------+-------------------------+ Classic Controller Controls: +------------------+--------------------+-------------------------+ | Action | Button | Mapped From | +------------------+--------------------+-------------------------+ | Movement | L Analog | Keyboard W/A/S/D | | Jump/Back | y | Keyboard K | | Jump/Select | b | Keyboard J | | Start | + | Keyboard Enter | | Super Sonic | x | Keyboard I | | Tag Actions | a | Keyboard U | | Call | R | Keyboard P | | View Profile | L | Keyboard 1 | | Select Zone L | ZL | Keyboard Q | | Select Zone R | ZR | Keyboard O | +------------------+--------------------+-------------------------+ ------------------------------------------------------------------------------*/ if (Wiimote.Classic.Exists) then // Movement Keyboard.W = (-2 < Wiimote.Classic.Joy1Y < -0.4) or (Wiimote.Classic.Up) Keyboard.S = (2 > Wiimote.Classic.Joy1Y > 0.4) or (Wiimote.Classic.Down) Keyboard.A = (-2 < Wiimote.Classic.Joy1X < -0.4) or (Wiimote.Classic.Left) Keyboard.D = (2 > Wiimote.Classic.Joy1X > 0.4) or (Wiimote.Classic.Right) // Jump/Back Keyboard.K = Wiimote.Classic.Y // Jump/Select Keyboard.J = Wiimote.Classic.B // Start Keyboard.Enter = Wiimote.Classic.Plus // Super Sonic Keyboard.I = Wiimote.Classic.X // Tag Actions Keyboard.U = Wiimote.Classic.A // Call Keyboard.P = Wiimote.Classic.R // View Profile Keyboard.One = Wiimote.Classic.L // Select Zone Keyboard.Q = Wiimote.Classic.ZL Keyboard.O = Wiimote.Classic.ZR elseif (Wiimote.Nunchuk.Exists) then // Movement Keyboard.W = (-2 < Wiimote.Nunchuk.JoyY < -0.4) Keyboard.S = (2 > Wiimote.Nunchuk.JoyY > 0.4) Keyboard.A = (-2 < Wiimote.Nunchuk.JoyX < -0.4) Keyboard.D = (2 > Wiimote.Nunchuk.JoyX > 0.4) // Jump/Back Keyboard.K = Wiimote.B // Jump/Select Keyboard.J = Wiimote.A // Start Keyboard.Enter = Wiimote.Plus // Super Sonic Keyboard.I = Wiimote.Minus // Tag Actions Keyboard.U = Wiimote.Nunchuk.Z // Call Keyboard.P = Wiimote.Nunchuk.C // View Profile Keyboard.One = Wiimote.One // Select Zone Keyboard.Q = Wiimote.Left Keyboard.O = Wiimote.Right else // Movement / Select Zone Keyboard.S+Keyboard.Q = Wiimote.Left Keyboard.A+Keyboard.O = Wiimote.Up Keyboard.W = Wiimote.Right Keyboard.D = Wiimote.Down // Jump/Back Keyboard.K = Wiimote.One // Jump/Select Keyboard.J = Wiimote.Two // Start Keyboard.Enter = Wiimote.Plus // Super Sonic Keyboard.I = Wiimote.Minus // Tag Actions Keyboard.U = Wiimote.A // Call Keyboard.P = Wiimote.B // View Profile Keyboard.One = Wiimote.Home endif //------------------------------------------------------------------------------