PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free!
Click here to download the new Pastebin App for iOS
.
Public Pastes
Untitled
3 sec ago
Untitled
3 sec ago
Untitled
5 sec ago
Untitled
8 sec ago
Untitled
8 sec ago
Untitled
13 sec ago
Untitled
13 sec ago
Untitled
13 sec ago
New Paste
/*********************************************************************/ // Dreamcast Controls // From here we use the joystick // control information to map the // propery controls to the Dreamcast // emulator, PC game, or whatever. /*********************************************************************/ If ((Wiimote1.Classic.Exists == False)&&(Nunchuk1.Exists == False)) debug = "Please connect a Classic Controller or Nunchuk" If Wiimote1.Home == True If Wiimote1.Battery > (0.25 * 192) Wiimote1.Led1 = True Else Wiimote1.Led1 = False Endif If Wiimote1.Battery > (0.5 * 192) Wiimote1.Led2 = True Else Wiimote1.Led2 = False Endif If Wiimote1.Battery > (0.75 * 192) Wiimote1.Led3 = True Else Wiimote1.Led3 = False Endif If Wiimote1.Battery > (0.9 * 192) Wiimote1.Led4 = True Else Wiimote1.Led4 = False Endif Endif If Wiimote1.Home == False Wiimote1.Led1 = False Wiimote1.Led2 = False Wiimote1.Led3 = False Wiimote1.Led4 = False Endif Endif /*********************************************************************/ // Classic Controller // Everything works, including analog triggers // Digital Triggers also work, read comments. /*********************************************************************/ If Wiimote1.Classic.Exists // constants Var.DeadZone = 0.15; Var.LiveZone = 1.0 - Var.DeadZone; // apply deadzone to X axis If Var.JoyX1 < -Var.DeadZone Var.JoyX1 = (Var.JoyX1 + Var.DeadZone) / Var.LiveZone; Else If Var.JoyX1 > Var.DeadZone Var.JoyX1 = (Var.JoyX1 - Var.DeadZone) / Var.LiveZone; Else Var.JoyX1 = 0 EndIf EndIf // apply deadzone to Y axis If Var.JoyY1 < -Var.DeadZone Var.JoyY1 = (Var.JoyY1 + Var.DeadZone) / Var.LiveZone; Else If Var.JoyY1 > Var.DeadZone Var.JoyY1 = (Var.JoyY1 - Var.DeadZone) / Var.LiveZone; Else Var.JoyY1 = 0 EndIf EndIf If !Var.Init Var.Init = true Var.ControlMode = "Standard" EndIf If Pressed(HeldDown(Wiimote1.Home, 0.5s))||Pressed(HeldDown(Wiimote1.B, 0.5s))||Pressed(HeldDown(Wiimote1.A, 0.5s)) If Var.ControlMode == "Standard" Var.ControlMode = "VirtualOn" Elseif Var.ControlMode = "VirtualOn" Var.ControlMode = "Standard" EndIf EndIf PPJoy1.Digital1 = Wiimote1.Classic.x PPJoy1.Digital2 = Wiimote1.Classic.b PPJoy1.Digital8 = Wiimote1.Classic.Plus PPJoy1.Digital9 = Wiimote1.Classic.Minus PPJoy1.Digital10 = Wiimote1.Classic.Home PPJoy1.Digital20 = Wiimote1.Classic.Up PPJoy1.Digital21 = Wiimote1.Classic.Down PPJoy1.Digital22 = Wiimote1.Classic.Left PPJoy1.Digital23 = Wiimote1.Classic.Right // In configuration of your emulator, // slightly depress the triggers to // have them act as "axis buttons" // in order to get proper analog trigger // support If Wiimote1.Classic.L > 0.4 PPJoy1.Analog4 = Wiimote1.Classic.L Else PPJoy1.Analog4 = 0 EndIf If Wiimote1.Classic.R > 0.4 PPJoy1.Analog5 = Wiimote1.Classic.R Else PPJoy1.Analog5 = 0 EndIf // This is for digital versions of these buttons PPJoy1.Digital16 = Wiimote1.Classic.L PPJoy1.Digital17 = Wiimote1.Classic.R PPJoy1.Digital18 = Wiimote1.Classic.LFull PPJoy1.Digital19 = Wiimote1.Classic.RFull If Var.ControlMode == "Standard" Wiimote1.Led1 = True Wiimote1.Led2 = False Wiimote1.Led3 = False Wiimote1.Led4 = True // This is for stupid // programs that can't detect the first joystick button PPJoy1.Digital15 = Wiimote1.Classic.y PPJoy1.Digital0 = Wiimote1.Classic.y PPJoy1.Digital3 = Wiimote1.Classic.a PPJoy1.Digital6 = Wiimote1.Classic.ZL PPJoy1.Digital7 = Wiimote1.Classic.ZR PPJoy1.Digital4 = Wiimote1.Classic.L PPJoy1.Digital5 = Wiimote1.Classic.R PPJoy1.Digital11 = Wiimote1.A PPJoy1.Digital12 = Wiimote1.B PPJoy1.Digital13 = Wiimote1.1 PPJoy1.Digital14 = Wiimote1.2 PPJoy1.Digital24 = Wiimote1.Up PPJoy1.Digital25 = Wiimote1.Down PPJoy1.Digital26 = Wiimote1.Left PPJoy1.Digital27 = Wiimote1.Right PPJoy1.Analog2 = Wiimote1.Classic.Joy2X PPJoy1.Analog3 = Wiimote1.Classic.Joy2Y PPJoy1.Analog6 = Wiimote1.RawForceX PPJoy1.Analog7 = Wiimote1.RawForceY PPJoy1.Analog8 = Wiimote1.RawForceZ Var.JoyX1 = Wiimote1.Classic.Joy1X Var.JoyY1 = Wiimote1.Classic.Joy1Y PPJoy1.Analog0 = Var.JoyX1 PPJoy1.Analog1 = Var.JoyY1 EndIf If Var.ControlMode == "VirtualOn" Wiimote1.Led1 = False Wiimote1.Led2 = True Wiimote1.Led3 = True Wiimote1.Led4 = False Var.JoyDead1 = 0.3 // Move Forward If ((Wiimote1.Classic.Joy1Y < -Var.JoyDead1)&&(Wiimote1.Classic.Joy2Y < -Var.JoyDead1))||Wiimote1.Classic.Up == True PPJoy1.Digital20 = True Else PPJoy1.Digital20 = False EndIf // Move Backward If ((Wiimote1.Classic.Joy1Y > Var.JoyDead1)&&(Wiimote1.Classic.Joy2Y > Var.JoyDead1))||Wiimote1.Classic.Down == True PPJoy1.Digital21 = True Else PPJoy1.Digital21 = False EndIf // Move Left If ((Wiimote1.Classic.Joy1X < -Var.JoyDead1)&&(Wiimote1.Classic.Joy2X < -Var.JoyDead1))||Wiimote1.Classic.Left == True PPJoy1.Digital22 = True Else PPJoy1.Digital22 = False EndIf // Move Right If ((Wiimote1.Classic.Joy1X > Var.JoyDead1)&&(Wiimote1.Classic.Joy2X > Var.JoyDead1))||Wiimote1.Classic.Right == True PPJoy1.Digital23 = True Else PPJoy1.Digital23 = False EndIf // Turn Left If (Wiimote1.Classic.Joy1Y < -Var.JoyDead1)&&(Wiimote1.Classic.Joy2Y > Var.JoyDead1) PPJoy1.Analog0 = 0.5 Var.TurnRight = True Else Var.TurnRight = False EndIf // Turn Right If (Wiimote1.Classic.Joy1Y > Var.JoyDead1)&&(Wiimote1.Classic.Joy2Y < -Var.JoyDead1) PPJoy1.Analog0 = -0.5 Var.TurnLeft = True Else Var.TurnLeft = False EndIf // No Turn If ((Var.TurnLeft == False)&&(Var.TurnRight == False)) PPJoy1.Analog0 = 0 EndIf // Jump If (Wiimote1.Classic.Joy1X < -Var.JoyDead1)&&(Wiimote1.Classic.Joy2X > Var.JoyDead1) PPJoy1.Digital15 = True PPJoy1.Digital1 = True Else PPJoy1.Digital15 = False PPJoy1.Digital1 = False EndIf // Crouch If ((Wiimote1.Classic.Joy1X > Var.JoyDead1)&&(Wiimote1.Classic.Joy2X < -Var.JoyDead1))||Wiimote1.Classic.b == True PPJoy1.Digital2 = True Else PPJoy1.Digital2 = False EndIf PPJoy1.Digital15 = Wiimote1.Classic.ZR PPJoy1.Digital3 = Wiimote1.Classic.ZL If PPJoy1.Digital15 == True || PPJoy.Digital3 == True PPJoy1.Digital0 = True Wiimote1.Rumble = True Else PPJoy1.Digital0 = False Wiimote1.Rumble = False EndIf EndIf debug = "Classic Controller Connected; " + Var.ControlMode + ". Xtra: " + PPJoy1.Digital15 EndIf /*********************************************************************/ // Nunchuk Controls (Virtual On) // These controls were designed specifically // for the Dreamcast "Virtual On" sequel. // // In addition, the directional buttons // on the Wiimote can navigate the menus /*********************************************************************/ /*********************************************************************/ // Joystick Controls // This is general joystick control // management. It lets you keep track // of which way our virtual joysticks // are pointed. Var.WiiLS_Left means : // // LS = Left Stick (Nunchuk) // _Left = Pointed Left // RS for Right Stick (Wiimote) and _Up/_Down/_Right // for those respective directions /*********************************************************************/ // Wiimote/Nunchuk's minimum push for // left or right Directions Var.MinRightStick = 0.25 Var.MinLeftStick = 0.25 // Wiimote/Nunchuk's minimum push for // forward and backward directions Var.MinRightForward = 0.5 Var.MinRightBackward = 0.3 Var.MinLeftForward = 0.5 Var.MinLeftBackward = 0.3 If Nunchuk1.Exists //Right weapon If Wiimote1.B Key.C = True Wiimote1.LED4 = True Else Key.C = False Wiimote1.LED4 = False EndIf //Left weapon If Nunchuk1.Zbutton Wiimote1.LED1 = True Key.D = True Else Wiimote1.LED1 = False Key.D = False EndIf //Dash If Wiimote1.A || Nunchuk1.CButton Wiimote1.Rumble = True //Rumble feedback will be on while dashing Wiimote1.LED2 and Wiimote1.LED3 = True //The two center LEDs will show us that we're dashing Else Key.X = False Wiimote1.Rumble = False Wiimote1.LED2 and Wiimote1.LED3 = False EndIf //Start Key.Space = Wiimote1.Home // Right stick // Moving to the left If Wiimote1.GX > Var.MinRightStick Var.WiiRS_Left = True Wiimote1.LED4 = True Else Var.WiiRS_Left = False Wiimote1.LED4 = False EndIf // Moving to the right If Wiimote1.GX < -Var.MinRightStick Var.WiiRS_Right = True Wiimote1.LED3 = True Else Var.WiiRS_Right = False Wiimote1.LED3 = False EndIf // Tilted forward If Wiimote1.GY > Var.MinRightForward Var.WiiRS_Up = True Else Var.WiiRS_Up = False EndIf // Tilted backward If Wiimote1.GY < -Var.MinRightBackward Var.WiiRS_Down = True Else Var.WiiRS_Down = False EndIf // Left stick // Moving to the left If Nunchuk1.GX > Var.MinLeftStick Var.WiiLS_Left = True Wiimote1.LED4 = True Else Var.WiiLS_Left = False Wiimote1.LED4 = False EndIf // Moving to the right If Nunchuk1.GX < -Var.MinLeftStick Var.WiiLS_Right = True Wiimote1.LED3 = True Else Var.WiiLS_Right = False Wiimote1.LED3 = False EndIf // Tilted forward If Nunchuk1.GY > Var.MinLeftForward Var.WiiLS_Up = True Else Var.WiiLS_Up = False EndIf // Tilted backward If Nunchuk1.GY < -Var.MinLeftBackward Var.WiiLS_Down = True Else Var.WiiLS_Down = False EndIf *********************************************************************/ // If you're playing Virtual On // somewhere else, or simply using // another game that has dual joystick // inputs, this is where you should start // modifying the script. Remember to use // WiiLS_Left and so forth as your source input. *********************************************************************/ // Move Right If (((Var.WiiLS_Right == True)&&(Var.WiiRS_Right == True))||(Wiimote1.Right == True)) Var.DebugText = "Moving Right" PPJoy1.Digital23 = True Else PPJoy1.Digital23 = False EndIf // Move Left If (((Var.WiiLS_Left == True)&&(Var.WiiRS_Left == True))||(Wiimote1.Left == True)) Var.DebugText = "Moving Left" PPJoy1.Digital22 = True Else PPJoy1.Digital22 = False EndIf // Move Forward If (((Var.WiiLS_Up == True)&&(Var.WiiRS_Up == True))||(Wiimote1.Up == True)) Var.DebugText = "Moving Forward" PPJoy1.Digital20 = True Else PPJoy1.Digital20 = False EndIf // Move Backward If (((Var.WiiLS_Down == True)&&(Var.WiiRS_Down == True))||(Wiimote1.Down == True)) Var.DebugText = "Moving Backward" PPJoy1.Digital21 = True Else PPJoy1.Digital21 = False EndIf // Turn Right If ((Var.WiiLS_Up == True)&&(Var.WiiRS_Down == True)) Var.DebugText = "Turning Right" PPJoy1.Analog0 = Nunchuk1.GY Var.TurningRight = True Else Var.TurningRight = False EndIf // Turn Left If ((Var.WiiLS_Down == True)&&(Var.WiiRS_Up == True)) Var.DebugText = "Turning Left" PPJoy1.Analog0 = Nunchuk1.GY Var.TurningLeft = True Else Var.TurningLeft = False EndIf // No Turning // The main reason I keep those TurningLeft // and TurningRight variables is because I'm // controlling the analog stick. Therefore I can't // simply check button states to see if it's not turning // in either direction If ((Var.TurningRight == False)&&(Var.TurningLeft == False)) PPJoy1.Analog0 = 0 EndIf // Flying If ((Var.WiiLS_Left == True)&&(Var.WiiRS_Right == True)) Var.DebugText = "Flying" PPJoy1.Digital1 = True Else PPJoy1.Digital1 = False EndIf // Crouching If (((Var.WiiLS_Right == True)&&(Var.WiiRS_Left == True))||(Wiimote1.Minus == True)) Var.DebugText = "Crouching" PPJoy1.Digital2 = True Else PPJoy1.Digital2 = False EndIf If ((Var.WiiLS_Right == False)&&(Var.WiiLS_Left == False)&&(Var.WiiLS_Up == False)&&(Var.WiiLS_Down == False)&&(Var.WiiRS_Right == False)&&(Var.WiiRS_Left == False)&&(Var.WiiRS_Up == False)&&(Var.WiiRS_Down == False)) Var.DebugText = "Neutral" EndIf // These are the Dreamcast Buttons // They match up with the Classic Controller // Dreamcast Script I have, so you only need // to configure your emulator *once*. // This pauses //PPJoy1.Digital10 = Wiimote1.Plus PPJoy1.Digital8 = Wiimote1.Plus // This is turbo AND cancel in the menus PPJoy1.Digital3 = Wiimote1.A // This is just turbo PPJoy1.Digital0 = Nunchuk1.CButton // This is for dumb programs that don't // accept input from the first joystick // button. Same on Classic Script PPJoy1.Digital15 = Nunchuk1.CButton // This is the left firing trigger //PPJoy1.Digital6 = Nunchuk1.ZButton If Nunchuk1.ZButton == True PPJoy1.Digital16 = True PPJoy1.Digital18 = True PPJoy1.Analog4 = 1.0 Else PPJoy1.Digital16 = False PPJoy1.Digital18 = False PPJoy1.Analog4 = 0 Endif // This is the right firing trigger //PPJoy1.Digital7 = Wiimote1.B If Wiimote1.B == True PPJoy1.Digital17 = True PPJoy1.Digital19 = True PPJoy1.Analog5 = 1.0 Else PPJoy1.Digital17 = False PPJoy1.Digital19 = False PPJoy1.Analog5 = 0 Endif If ((Wiimote1.GX > -Var.MinRightStick)&&(Wiimote1.GX < Var.MinRightStick)&&(Wiimote1.GY < Var.MinRightForward)&&(Wiimote1.GY > Var.MinRightBackward)) var.debugR = "Neutral" EndIf If ((Nunchuk1.GX > -Var.MinLeftStick)&&(Nunchuk1.GX < Var.MinLeftStick)&&(Nunchuk1.GY < Var.MinLeftForward)&&(Nunchuk1.GY > Var.MinLeftBackward)) var.debugL = "Neutral" EndIf //debug = Var.DebugText + " StickX : " + Wiimote1.GX + ". StickY : " + Wiimote1.GY debug = "Wiimote : " + Wiimote1.GX + "/" + Wiimote1.GY + ". Nunchuk : " + PPJoy1.Analog0 + "/" + PPJoy1.Analog1 + " " + Var.DebugText EndIf // Player Two // Player 2 /*********************************************************************/ // Dreamcast Controls // From here we use the joystick // control information to map the // propery controls to the Dreamcast // emulator, PC game, or whatever. /*********************************************************************/ If ((Wiimote2.Classic.Exists == False)&&(Nunchuk2.Exists == False)) debug = "Please connect a Classic Controller or Nunchuk" If Wiimote2.Home == True If Wiimote2.Battery > (0.25 * 192) Wiimote2.Led1 = True Else Wiimote2.Led1 = False Endif If Wiimote2.Battery > (0.5 * 192) Wiimote2.Led2 = True Else Wiimote2.Led2 = False Endif If Wiimote2.Battery > (0.75 * 192) Wiimote2.Led3 = True Else Wiimote2.Led3 = False Endif If Wiimote2.Battery > (0.9 * 192) Wiimote2.Led4 = True Else Wiimote2.Led4 = False Endif Endif If Wiimote2.Home == False Wiimote2.Led1 = False Wiimote2.Led2 = False Wiimote2.Led3 = False Wiimote2.Led4 = False Endif Endif /*********************************************************************/ // Classic Controller // Everything works, including analog triggers // Digital Triggers also work, read comments. /*********************************************************************/ If Wiimote2.Classic.Exists // constants Var.DeadZone = 0.15; Var.LiveZone = 1.0 - Var.DeadZone; // apply deadzone to X axis If Var.JoyX2 < -Var.DeadZone Var.JoyX2 = (Var.JoyX2 + Var.DeadZone) / Var.LiveZone; Else If Var.JoyX2 > Var.DeadZone Var.JoyX2 = (Var.JoyX2 - Var.DeadZone) / Var.LiveZone; Else Var.JoyX2 = 0 EndIf EndIf // apply deadzone to Y axis If Var.JoyY2 < -Var.DeadZone Var.JoyY2 = (Var.JoyY2 + Var.DeadZone) / Var.LiveZone; Else If Var.JoyY2 > Var.DeadZone Var.JoyY2 = (Var.JoyY2 - Var.DeadZone) / Var.LiveZone; Else Var.JoyY2 = 0 EndIf EndIf If !Var.Init Var.Init = true Var.ControlMode = "Standard" EndIf If Pressed(HeldDown(Wiimote2.Home, 0.5s))||Pressed(HeldDown(Wiimote2.B, 0.5s))||Pressed(HeldDown(Wiimote2.A, 0.5s)) If Var.ControlMode == "Standard" Var.ControlMode = "VirtualOn" Elseif Var.ControlMode = "VirtualOn" Var.ControlMode = "Standard" EndIf EndIf PPJoy2.Digital1 = Wiimote2.Classic.x PPJoy2.Digital2 = Wiimote2.Classic.b PPJoy2.Digital8 = Wiimote2.Classic.Plus PPJoy2.Digital9 = Wiimote2.Classic.Minus PPJoy2.Digital10 = Wiimote2.Classic.Home PPJoy2.Digital20 = Wiimote2.Classic.Up PPJoy2.Digital21 = Wiimote2.Classic.Down PPJoy2.Digital22 = Wiimote2.Classic.Left PPJoy2.Digital23 = Wiimote2.Classic.Right // In configuration of your emulator, // slightly depress the triggers to // have them act as "axis buttons" // in order to get proper analog trigger // support If Wiimote2.Classic.L > 0.4 PPJoy2.Analog4 = Wiimote2.Classic.L Else PPJoy2.Analog4 = 0 EndIf If Wiimote2.Classic.R > 0.4 PPJoy2.Analog5 = Wiimote2.Classic.R Else PPJoy2.Analog5 = 0 EndIf // This is for digital versions of these buttons PPJoy2.Digital16 = Wiimote2.Classic.L PPJoy2.Digital17 = Wiimote2.Classic.R PPJoy2.Digital18 = Wiimote2.Classic.LFull PPJoy2.Digital19 = Wiimote2.Classic.RFull If Var.ControlMode == "Standard" Wiimote2.Led1 = True Wiimote2.Led2 = False Wiimote2.Led3 = False Wiimote2.Led4 = True // This is for stupid // programs that can't detect the first joystick button PPJoy2.Digital15 = Wiimote2.Classic.y PPJoy2.Digital0 = Wiimote2.Classic.y PPJoy2.Digital3 = Wiimote2.Classic.a PPJoy2.Digital6 = Wiimote2.Classic.ZL PPJoy2.Digital7 = Wiimote2.Classic.ZR PPJoy2.Digital4 = Wiimote2.Classic.L PPJoy2.Digital5 = Wiimote2.Classic.R PPJoy2.Digital11 = Wiimote2.A PPJoy2.Digital12 = Wiimote2.B PPJoy2.Digital13 = Wiimote2.1 PPJoy2.Digital14 = Wiimote2.2 PPJoy2.Digital24 = Wiimote2.Up PPJoy2.Digital25 = Wiimote2.Down PPJoy2.Digital26 = Wiimote2.Left PPJoy2.Digital27 = Wiimote2.Right PPJoy2.Analog2 = Wiimote2.Classic.Joy2X PPJoy2.Analog3 = Wiimote2.Classic.Joy2Y PPJoy2.Analog6 = Wiimote2.RawForceX PPJoy2.Analog7 = Wiimote2.RawForceY PPJoy2.Analog8 = Wiimote2.RawForceZ Var.JoyX2 = Wiimote2.Classic.Joy1X Var.JoyY2 = Wiimote2.Classic.Joy1Y PPJoy2.Analog0 = Var.JoyX2 PPJoy2.Analog1 = Var.JoyY2 EndIf If Var.ControlMode == "VirtualOn" Wiimote2.Led1 = False Wiimote2.Led2 = True Wiimote2.Led3 = True Wiimote2.Led4 = False Var.JoyDead2 = 0.3 // Move Forward If ((Wiimote2.Classic.Joy1Y < -Var.JoyDead2)&&(Wiimote2.Classic.Joy2Y < -Var.JoyDead2))||Wiimote2.Classic.Up == True PPJoy2.Digital20 = True Else PPJoy2.Digital20 = False EndIf // Move Backward If ((Wiimote2.Classic.Joy1Y > Var.JoyDead2)&&(Wiimote2.Classic.Joy2Y > Var.JoyDead2))||Wiimote2.Classic.Down == True PPJoy2.Digital21 = True Else PPJoy2.Digital21 = False EndIf // Move Left If ((Wiimote2.Classic.Joy1X < -Var.JoyDead2)&&(Wiimote2.Classic.Joy2X < -Var.JoyDead2))||Wiimote2.Classic.Left == True PPJoy2.Digital22 = True Else PPJoy2.Digital22 = False EndIf // Move Right If ((Wiimote2.Classic.Joy1X > Var.JoyDead2)&&(Wiimote2.Classic.Joy2X > Var.JoyDead2))||Wiimote2.Classic.Right == True PPJoy2.Digital23 = True Else PPJoy2.Digital23 = False EndIf // Turn Left If (Wiimote2.Classic.Joy1Y < -Var.JoyDead2)&&(Wiimote2.Classic.Joy2Y > Var.JoyDead2) PPJoy2.Analog0 = 0.5 Var.TurnRight = True Else Var.TurnRight = False EndIf // Turn Right If (Wiimote2.Classic.Joy1Y > Var.JoyDead2)&&(Wiimote2.Classic.Joy2Y < -Var.JoyDead2) PPJoy2.Analog0 = -0.5 Var.TurnLeft = True Else Var.TurnLeft = False EndIf // No Turn If ((Var.TurnLeft == False)&&(Var.TurnRight == False)) PPJoy2.Analog0 = 0 EndIf // Jump If (Wiimote2.Classic.Joy1X < -Var.JoyDead2)&&(Wiimote2.Classic.Joy2X > Var.JoyDead2) PPJoy2.Digital15 = True PPJoy2.Digital1 = True Else PPJoy2.Digital15 = False PPJoy2.Digital1 = False EndIf // Crouch If ((Wiimote2.Classic.Joy1X > Var.JoyDead2)&&(Wiimote2.Classic.Joy2X < -Var.JoyDead2))||Wiimote2.Classic.b == True PPJoy2.Digital2 = True Else PPJoy2.Digital2 = False EndIf PPJoy2.Digital15 = Wiimote2.Classic.ZR PPJoy2.Digital3 = Wiimote2.Classic.ZL If PPJoy2.Digital15 == True || PPJoy.Digital3 == True PPJoy2.Digital0 = True Wiimote2.Rumble = True Else PPJoy2.Digital0 = False Wiimote2.Rumble = False EndIf EndIf debug = "Classic Controller Connected; " + Var.ControlMode + ". Xtra: " + PPJoy2.Digital15 EndIf /*********************************************************************/ // Nunchuk Controls (Virtual On) // These controls were designed specifically // for the Dreamcast "Virtual On" sequel. // // In addition, the directional buttons // on the Wiimote can navigate the menus /*********************************************************************/ /*********************************************************************/ // Joystick Controls // This is general joystick control // management. It lets you keep track // of which way our virtual joysticks // are pointed. Var.WiiLS_Left means : // // LS = Left Stick (Nunchuk) // _Left = Pointed Left // RS for Right Stick (Wiimote) and _Up/_Down/_Right // for those respective directions /*********************************************************************/ // Wiimote/Nunchuk's minimum push for // left or right Directions Var.MinRightStick = 0.25 Var.MinLeftStick = 0.25 // Wiimote/Nunchuk's minimum push for // forward and backward directions Var.MinRightForward = 0.5 Var.MinRightBackward = 0.3 Var.MinLeftForward = 0.5 Var.MinLeftBackward = 0.3 If Nunchuk2.Exists //Right weapon If Wiimote2.B Key.C = True Wiimote2.LED4 = True Else Key.C = False Wiimote2.LED4 = False EndIf //Left weapon If Nunchuk2.Zbutton Wiimote2.LED1 = True Key.D = True Else Wiimote2.LED1 = False Key.D = False EndIf //Dash If Wiimote2.A || Nunchuk2.CButton Wiimote2.Rumble = True //Rumble feedback will be on while dashing Wiimote2.LED2 and Wiimote2.LED3 = True //The two center LEDs will show us that we're dashing Else Key.X = False Wiimote2.Rumble = False Wiimote2.LED2 and Wiimote2.LED3 = False EndIf //Start Key.Space = Wiimote2.Home // Right stick // Moving to the left If Wiimote2.GX > Var.MinRightStick Var.WiiRS_Left = True Wiimote2.LED4 = True Else Var.WiiRS_Left = False Wiimote2.LED4 = False EndIf // Moving to the right If Wiimote2.GX < -Var.MinRightStick Var.WiiRS_Right = True Wiimote2.LED3 = True Else Var.WiiRS_Right = False Wiimote2.LED3 = False EndIf // Tilted forward If Wiimote2.GY > Var.MinRightForward Var.WiiRS_Up = True Else Var.WiiRS_Up = False EndIf // Tilted backward If Wiimote2.GY < -Var.MinRightBackward Var.WiiRS_Down = True Else Var.WiiRS_Down = False EndIf // Left stick // Moving to the left If Nunchuk2.GX > Var.MinLeftStick Var.WiiLS_Left = True Wiimote2.LED4 = True Else Var.WiiLS_Left = False Wiimote2.LED4 = False EndIf // Moving to the right If Nunchuk2.GX < -Var.MinLeftStick Var.WiiLS_Right = True Wiimote2.LED3 = True Else Var.WiiLS_Right = False Wiimote2.LED3 = False EndIf // Tilted forward If Nunchuk2.GY > Var.MinLeftForward Var.WiiLS_Up = True Else Var.WiiLS_Up = False EndIf // Tilted backward If Nunchuk2.GY < -Var.MinLeftBackward Var.WiiLS_Down = True Else Var.WiiLS_Down = False EndIf *********************************************************************/ // If you're playing Virtual On // somewhere else, or simply using // another game that has dual joystick // inputs, this is where you should start // modifying the script. Remember to use // WiiLS_Left and so forth as your source input. *********************************************************************/ // Move Right If (((Var.WiiLS_Right == True)&&(Var.WiiRS_Right == True))||(Wiimote2.Right == True)) Var.DebugText = "Moving Right" PPJoy2.Digital23 = True Else PPJoy2.Digital23 = False EndIf // Move Left If (((Var.WiiLS_Left == True)&&(Var.WiiRS_Left == True))||(Wiimote2.Left == True)) Var.DebugText = "Moving Left" PPJoy2.Digital22 = True Else PPJoy2.Digital22 = False EndIf // Move Forward If (((Var.WiiLS_Up == True)&&(Var.WiiRS_Up == True))||(Wiimote2.Up == True)) Var.DebugText = "Moving Forward" PPJoy2.Digital20 = True Else PPJoy2.Digital20 = False EndIf // Move Backward If (((Var.WiiLS_Down == True)&&(Var.WiiRS_Down == True))||(Wiimote2.Down == True)) Var.DebugText = "Moving Backward" PPJoy2.Digital21 = True Else PPJoy2.Digital21 = False EndIf // Turn Right If ((Var.WiiLS_Up == True)&&(Var.WiiRS_Down == True)) Var.DebugText = "Turning Right" PPJoy2.Analog0 = Nunchuk2.GY Var.TurningRight = True Else Var.TurningRight = False EndIf // Turn Left If ((Var.WiiLS_Down == True)&&(Var.WiiRS_Up == True)) Var.DebugText = "Turning Left" PPJoy2.Analog0 = Nunchuk2.GY Var.TurningLeft = True Else Var.TurningLeft = False EndIf // No Turning // The main reason I keep those TurningLeft // and TurningRight variables is because I'm // controlling the analog stick. Therefore I can't // simply check button states to see if it's not turning // in either direction If ((Var.TurningRight == False)&&(Var.TurningLeft == False)) PPJoy2.Analog0 = 0 EndIf // Flying If ((Var.WiiLS_Left == True)&&(Var.WiiRS_Right == True)) Var.DebugText = "Flying" PPJoy2.Digital1 = True Else PPJoy2.Digital1 = False EndIf // Crouching If (((Var.WiiLS_Right == True)&&(Var.WiiRS_Left == True))||(Wiimote2.Minus == True)) Var.DebugText = "Crouching" PPJoy2.Digital2 = True Else PPJoy2.Digital2 = False EndIf If ((Var.WiiLS_Right == False)&&(Var.WiiLS_Left == False)&&(Var.WiiLS_Up == False)&&(Var.WiiLS_Down == False)&&(Var.WiiRS_Right == False)&&(Var.WiiRS_Left == False)&&(Var.WiiRS_Up == False)&&(Var.WiiRS_Down == False)) Var.DebugText = "Neutral" EndIf // These are the Dreamcast Buttons // They match up with the Classic Controller // Dreamcast Script I have, so you only need // to configure your emulator *once*. // This pauses //PPJoy2.Digital10 = Wiimote2.Plus PPJoy2.Digital8 = Wiimote2.Plus // This is turbo AND cancel in the menus PPJoy2.Digital3 = Wiimote2.A // This is just turbo PPJoy2.Digital0 = Nunchuk2.CButton // This is for dumb programs that don't // accept input from the first joystick // button. Same on Classic Script PPJoy2.Digital15 = Nunchuk2.CButton // This is the left firing trigger //PPJoy2.Digital6 = Nunchuk2.ZButton If Nunchuk2.ZButton == True PPJoy2.Digital16 = True PPJoy2.Digital18 = True PPJoy2.Analog4 = 1.0 Else PPJoy2.Digital16 = False PPJoy2.Digital18 = False PPJoy2.Analog4 = 0 Endif // This is the right firing trigger //PPJoy2.Digital7 = Wiimote2.B If Wiimote2.B == True PPJoy2.Digital17 = True PPJoy2.Digital19 = True PPJoy2.Analog5 = 1.0 Else PPJoy2.Digital17 = False PPJoy2.Digital19 = False PPJoy2.Analog5 = 0 Endif If ((Wiimote2.GX > -Var.MinRightStick)&&(Wiimote2.GX < Var.MinRightStick)&&(Wiimote2.GY < Var.MinRightForward)&&(Wiimote2.GY > Var.MinRightBackward)) var.debugR = "Neutral" EndIf If ((Nunchuk2.GX > -Var.MinLeftStick)&&(Nunchuk2.GX < Var.MinLeftStick)&&(Nunchuk2.GY < Var.MinLeftForward)&&(Nunchuk2.GY > Var.MinLeftBackward)) var.debugL = "Neutral" EndIf //debug = Var.DebugText + " StickX : " + Wiimote2.GX + ". StickY : " + Wiimote2.GY debug = "Wiimote : " + Wiimote2.GX + "/" + Wiimote2.GY + ". Nunchuk : " + PPJoy2.Analog0 + "/" + PPJoy2.Analog1 + " " + Var.DebugText EndIf
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login