Prototype Script For Glovepie

Discussion in 'Wii - Hardware, Devices and Utilities' started by nitrodude150, Jun 17, 2009.

Jun 17, 2009
  1. nitrodude150
    OP

    Member nitrodude150 GBAtemp Regular

    Joined:
    Feb 2, 2008
    Messages:
    210
    Country:
    United States
    So....I put together a Glovepie script for PROTOTYPE! A brand new Game by Activision! Right now, in the game, you'll have to turn your sensitivity to the lowest "1" as I am having trouble with the calibration. Control of mouse is done w/o IR as the IR samples I had were too laggy/Locked up alot. But its really fun to play -- just dont try any 'events' [​IMG]
    So I am mainly putting this up to see if anyone would like to improve it as I would hope that someone knows how to make it smooth, as this still is pretty etchy, less than the IR ones I had. If anybody knows how t put some good IR I'd love to try out the script! All help is welcomed!

    CODE//||||[GAME] PROTOTYPE GLOVE PIE SCRIPT BETA VERSION!!||||
    //By Nitrodude150

    //Hold down Z and C to use normal mouse
    var.mouse = helddown(nunchuk.CButton and nunchuk.ZButton,350 ms)

    //Buttons mapping (edit like you want)

    key.LeftShift = wiimote.b
    key.Space = wiimote.a

    key.1 = wiimote.Up
    key.2 = wiimote.Left
    key.3 = wiimote.down
    key.4 = wiimote.Right

    key.Tab = wiimote.Minus
    key.E = wiimote.Home
    key.F = wiimote.Plus

    key.R = wiimote.One
    key.Escape = keepdown(pressed(wiimote.Two),25ms)

    mouse.rightbutton = wiimote.Nunchuk.ZButton and not var.mouse
    mouse.LeftButton = wiimote.Nunchuk.CButton and not var.mouse

    key.W = nunchuk.Joyy < -0.6ÂÂÂÂÂÂÂÂÂÂ//Nunchuk Up
    key.A = nunchuk.Joyx < -0.6ÂÂÂÂÂÂÂÂÂÂ//Nunchuk Left
    key.S = nunchuk.Joyy > 0.6ÂÂÂÂÂÂÂÂÂÂ //Nunchuk Down
    key.D = nunchuk.Joyx > 0.6ÂÂÂÂÂÂÂÂÂÂ //Nunchuk Right


    wiimote.Rumble = KeepDown(Pressed(wiimote.Nunchuk.CButton or var.mouse),250 ms)

    // Show wiimote forces
    debug = "X="+Wiimote.RawForceX+' Y='+Wiimote.RawForceY+' Z='+Wiimote.RawForceZ

    // set these to the offsets when the wiimote is at rest
    // will be different for each wiimote
    var.x = Wiimote.RawForceX +2 //trim to 0
    var.y = Wiimote.RawForceY -28 // trim to 0
    var.z = Wiimote.RawForceZ +3 //trim to 0

    //precision
    var.sense0 = 1000
    var.thresh0x = 5
    var.thresh0y = 2

    var.sense = 600
    var.threshx = 10
    var.threshy = 5

    var.sense2 = 200
    var.thresh2x = 15
    var.thresh2y = 8

    var.sense3 = 100
    var.thresh3x = 20
    var.thresh3y = 12

    //first sensitivity setting
    //xaxis
    if var.x > var.thresh0x
    mouse.x = mouse.x - .1/var.sense0
    endif
    if var.x < -var.thresh0x
    mouse.x = mouse.x + .1/var.sense0
    endif

    //yaxis
    if var.z > var.thresh0y
    mouse.y = mouse.y - .1/var.sense0
    endif
    if var.z < -var.thresh0y
    mouse.y = mouse.y + .1/var.sense0
    endif


    //second sensitivity setting
    //xaxis
    if var.x > var.threshx
    mouse.x = mouse.x - .1/var.sense
    endif
    if var.x < -var.threshx
    mouse.x = mouse.x + .1/var.sense
    endif

    //yaxis
    if var.z > var.threshy
    mouse.y = mouse.y - .1/var.sense
    endif
    if var.z < -var.threshy
    mouse.y = mouse.y + .1/var.sense
    endif

    //third sensitivity setting
    //xaxis
    if var.x > var.thresh2x
    mouse.x = mouse.x - .1/var.sense2
    endif
    if var.x < -var.thresh2x
    mouse.x = mouse.x + .1/var.sense2
    endif

    //yaxis
    if var.z > var.thresh2y
    mouse.y = mouse.y - .1/var.sense2
    endif
    if var.z < -var.thresh2y
    mouse.y = mouse.y + .1/var.sense2
    endif

    //fourth sensitivity setting
    //xaxis
    if var.x > var.thresh3x
    mouse.x = mouse.x - .1/var.sense3
    endif
    if var.x < -var.thresh3x
    mouse.x = mouse.x + .1/var.sense3
    endif

    //yaxis
    if var.z > var.thresh3y
    mouse.y = mouse.y - .1/var.sense3
    endif
    if var.z < -var.thresh3y
    mouse.y = mouse.y + .1/var.sense3
    endif
     
  2. alucard77

    Member alucard77 GBAtemp Fan

    Joined:
    Jul 20, 2006
    Messages:
    465
    Country:
    United States
    Is glovepie discussed here? If so that would be great. I have been looking for a forum where glove pie is discussed.
     
  3. nitrodude150
    OP

    Member nitrodude150 GBAtemp Regular

    Joined:
    Feb 2, 2008
    Messages:
    210
    Country:
    United States

Share This Page