hi again now i share my script to driving games, this script does the same that when playing driving games in wii.
you need ppjoy for this to work, like if you use it to play lightgun games in mame with wiimote then its good to go.
code:
// this script works with ppjoy default config and do the same work that mario kart in wii motion sensor
var.AlinhaVoltante = 3 // used to level wiimote
var.AjustaForca = -6.5 // used to align forceZ
// look for debug line and config this 2 lines to stay close of FORCE 0.00 and PPJOY closest to 0 too
//in my cab i have 0.00 and 0.13
//
var.AjustaAnalogico = 60 // 20 or 30 seems more precise but i prefer 60
//
PPJoy.Analog0 = ((wiimote.RawForceZ - var.AlinhaVoltante) / var.AjustaAnalogico)
//
VAR.FORCA = wiimote.RawForceZ -var.AjustaForca
DEBUG = "FORCE " + VAR.FORCA + " PPJOY " + PPJoy.Analog0
//
//directional buttons or gears
key.Q = wiimote.Up
key.A = wiimote.Right
key.W =wiimote.Down
key.S = wiimote.Left
if key.a || key.z then
var.RumbleLevel = 6
wait 500ms
wiimote.Rumble = true
wait 200ms
wiimote.Rumble = false
wait 60ms
endIf
// accelarator
Key.Up = Wiimote.One
//
// brakes
Key.Down = Wiimote.Two
// credits and start p1
Key.5 = Wiimote.Plus
Key.1 = Wiimote.Minus
// handbrake
Key.Space = Wiimote.A
anyway this script was not done by me is from a brazilian guy i only have removed stuff like leds blinking when turning and the rumble that was almost all the time on.
but it works great with supermodel 3, model 2 and if well configured should work with mame, etc.