GlovePIE:Flight Simulator 2004

From WiiLi

Jump to: navigation, search
/*
   ************************************************
   * FLIGHT SIMULATOR 2004 : UN SIECLE D'AVIATION *
   ************************************************
   Par MrAttila
   Mise à jour le 16 Janvier 2008

   NOTE : Vous devez utiliser PPJOY pour utiliser ce script
*/

// CALIBRAGE DE LA WIIMOTE
var.xOffset = 2
var.zOffset = 5

// CONFIGURATION DES BOUTONS DE LA WIIMOTE
// note : si vous préférez émuler les boutons de la wiimote
// via PPJOY, commentez cette section et décommentez la
// section EMULATION DES BOUTONS DE LA WIIMOTE EN BOUTON
// DU JOYSTICK
Shift + right = wiimote.right  // Vue à droite
Shift + left = wiimote.left    // Vue à gauche
Z = Wiimote.A                  // Agrandir la vue
G = Wiimote.B                  // Entrer/Sortir le train d'attérissage
F6 = Wiimote.up                // Rentrer les volets
F7 = Wiimote.down              // Sortir les volets
S = wiimote.two                // Changer de vue
Shift + three = wiimote.one    // Afficher/Cacher le GPS

If Wiimote.minus = True Then   // Maintien de la touche
F2 = True                      // Décélération du moteur
F2 = False
End If

If Wiimote.plus = True Then    // Maintien de la touche
F3 = True                      // Accélération du moteur
F3 = False
End If

If Wiimote.Home = True Then    // Maintien de la touche
Comma = True                   // Freiner
Comma = False
End If

/*
// EMULATION DES BOUTONS DE LA WIIMOTE EN BOUTON DU JOYSTICK
PPJoy.Digital0 = wiimote.Up
PPJoy.Digital1 = wiimote.Down
PPJoy.Digital2 = wiimote.Left
PPJoy.Digital3 = wiimote.Right
PPJoy.Digital4 = Wiimote.A
PPJoy.Digital5 = Wiimote.B
PPJoy.Digital6 = Wiimote.Minus
PPJoy.Digital7 = Wiimote.Plus
PPJoy.Digital8 = Wiimote.Home
PPJoy.Digital9 = wiimote.One
PPJoy.Digital10 = wiimote.Two
*/

// INTERPRETATION DE L'INCLINAISON DE LA WIIMOTE
PPJoy.Analog0 = -(wiimote.RawForceX + var.xOffset) / 25
PPJoy.Analog1 = (wiimote.RawForceZ + var.zOffset) / 25

// AFFICHAGE DE l'INCLINAISON DE LA WIIMOTE POUR CALIBRAGE
debug = "X: " + PPJoy.Analog0 + " ; Z: " + PPJoy.Analog1
Personal tools