GlovePIE:Need For Speed Underground

From WiiLi

Jump to: navigation, search
/*
   ********************************
   * NEED FOR SPEED : UNDERGROUND *
   ********************************
   Par MrAttila
   Mise à jour le 16 janvier 2008

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

// CALIBRAGE DE LA WIIMOTE
var.xOffset = 1
var.yOffset = 5
var.zOffset = 4

// CONFIGURATION DES BOUTONS DE LA WIIMOTE
// NOTE : configuration clavier par défaut dans NFS
key.Left = wiimote.Up        //Direction gauche
key.Right = wiimote.Down     //Direction droite
key.Down = wiimote.Left      //Frein / marche arrière
key.Up = wiimote.Right       //Accélérateur
key.Space = Wiimote.A        //Turbo
key.RightShift = Wiimote.B   //Frein à main
key.B = Wiimote.Minus        //Vue arrière
key.C = Wiimote.Plus         //Changer caméra
key.R = Wiimote.Home         //Replacer voiture
key.Delete = wiimote.One     //Vitesse inf.
key.Insert = wiimote.Two     //Vitesse sup.

// WIIMOTE A PLAT
// NOTE : pour jouer avec la wiimote à plat,
// décommentez cette section et commentez
// la section WIIMOTE HORIZONTALE
//PPJoy.Analog0 = -(wiimote.RawForceX + var.xOffset) / 23
//PPJoy.Analog1 = (wiimote.RawForceZ + var.zOffset) / 25
//debug = 'X: ' + PPJoy.Analog0 + ' ; Z: ' + PPJoy.Analog1

// WIIMOTE HORIZONTALE
// NOTE : Si vous voulez jouer avec la wiimote à plat,
// commentez cette section et décommentez
// la section WIIMOTE A PLAT
PPJoy.Analog1 = -(wiimote.RawForceY - var.yOffset) / 23
PPJoy.Analog0 = (wiimote.RawForceZ + var.zOffset) /25
debug = 'Y: ' + PPJoy.Analog1 + ' ; Z: ' + PPJoy.Analog0

// ANIMATION DES LEDS
if var.kitt = 0 then
wiimote.Leds = 1
endif
if var.kitt = 1 then
wiimote.Leds = 3
endif
if var.kitt = 2 then
wiimote.Leds = 6
endif
if var.kitt = 3 then
wiimote.Leds = 12
endif
if var.kitt = 4 then
wiimote.Leds = 8
endif
if var.kitt = 5 then
wiimote.Leds = 12
endif
if var.kitt = 6 then
wiimote.Leds = 6
endif
if var.kitt = 7 then
wiimote.Leds = 3
endif
wait 100 ms
var.kitt = (var.kitt + 1) % 8
Personal tools
Online Casino - best online casino reviews.
Facebook Developers - facebook applications, facebook developers, facebook development, social network application development and viral widget social media strategy