Welcome to Our Community

Wanting to join the rest of our members? Feel free to sign up today.

GlovePIE! Help me Please

Discussion in 'Nintendo Wii Hardware' started by pbeesley, Jan 26, 2007.

  1. pbeesley

    pbeesley I'm The Crazy One

    Joined:
    Dec 18, 2006
    Messages:
    95
    Likes Received:
    0
    Location:
    Bournemouth / UK
    Wii Friend Code: 8622-2818-8336-9466
    8622-2818-8336-9466
    Right please someone help me. I'm awful at coding but I had ago chopping some code together anyway. :sad:

    I need to have a glove pie script with the following keys mapped!

    Arrow keys but on its side, so mapped like the virtual console games? So tup on the wii mote is actually left...if you get what I mean :frown2:

    Then the '2' button and 'Space' and '1' for 'B'

    for some background on this I wanna play a game called "Jet's n Gun's"

    Someone Please help me! :(

    First correct script gets a thumbs up like this one :thumbsup:

    Prize may not be exhanged sold or in any way traded, value is 0.0000000001p
     
  2. pbeesley

    pbeesley I'm The Crazy One

    Joined:
    Dec 18, 2006
    Messages:
    95
    Likes Received:
    0
    Location:
    Bournemouth / UK
    Wii Friend Code: 8622-2818-8336-9466
    8622-2818-8336-9466
    never mind, did it looks like this

    //Wiimote Jets N Guns Controls By Pete Beesley
    //Feel free to modify and redistribute, but leave this here

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

    //Movement Keys. Works for both arrow keys and WASD.
    Keyboard.A and Keyboard.Left = Wiimote.Up
    Keyboard.D and Keyboard.Right = Wiimote.Down
    Keyboard.S and Keyboard.Down = Wiimote.Left
    Keyboard.W and Keyboard.Up = Wiimote.Right

    //Key assignments. Feel Free to change
    Keyboard.Esc = Wiimote.Home
    Keyboard.B = Wiimote.One
    Keyboard.Space = Wiimote.Two
    Keyboard.Enter = Wiimote.Plus
    Keyboard.G = Wiimote.Minus

    //You might want to switch these depending on your tastes
    Mouse.LeftButton = Wiimote.B
    Mouse.RightButton = Wiimote.A

    endif

    var.x = Wiimote.RawForceX + var.trimx
    var.y = Wiimote.RawForceY + var.trimy
    var.z = Wiimote.RawForceZ + var.trimz


    var.sense0 = 1000
    var.thresh0x = 2
    var.thresh0y = 1

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

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

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


    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


    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



    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


    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


    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


    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


    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

    debug = var.x + " " + var.y + " " + var.z
     

Share This Page

Search tags for this page
glovepie 0.29 sensor bar script
,

glovepie arrow keys

,
glovepie arrow keys sideways
,
glovepie arrowkeys
,
glovepie keyboard script
,
glovepie wasd
,
glovepie wiimote sideways arrow keys
,
scripts for glovepie arrow keys not working
,
wiimote glovepie wasd
,
wiimote sideways script for glove pie