Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ###################################
- # Wii Remote Audiosurf Controller #
- ###################################
- by sync1211
- compatible with
- -Audiosurf2
- -Audiosurf1 (probably)
- -Desktop/Surfing
- -Steam
- ###########!IMPORTANT!###########
- read the text throughout the script
- for a tutorial and custom keybinds
- if you aren't sure how to use this script you can send me an email at
- dpf12110@gmail.com
- or on Steam:
- http://steamcommunity.com/id/sync1211
- (Also, if you have ideas or want something changed. I REALLY NEED MORE FEEDBACK!)
- #################################
- */
- var.version="1.3.4"
- //Framerate of this script
- PIE.FrameRate=120Hz
- /*
- Version 1.3.4
- For Questions please write an email to dpf12110@gmail.com
- (Also if you need help connecting the remote to your PC)
- This script requires GlovePIE to run
- get it at http://glovepie.org/
- Feel free to send me your IDEAS or FEEDBACK!
- How to use:
- 1.Connect your Wii remote via bluetooth (instructions below)
- 2.Start this script (installing instructions below)
- 3.Have fun!
- Note: If you are connected and have this script running, all the lights on the remote should light up.
- (Exept, if you have changed the led configuration found below)
- It can be used with either Nunchuck, Wii-Wheel or with only the Wiimote.
- It uses mouse and keyboard keys and has been tested for months.
- Suggestions by
- ---------------
- -dpf1110 (http://steamcommunity.com/id/dpf1110)
- (Everyone who gave me suggestions is listed here)
- Tested by:
- ----------
- -sync1211(me)
- -dpf1110(my brother)
- (Everyone who tested the script during development is listed here)
- Changelog:
- ---------
- -0.0.2: Added new features
- -1.0.1: Release
- -1.1.0: Added scrolling support
- -1.2.0: Wii-Wheel support
- -1.2.1: Added Wii-Wheel sensitivity changer
- -1.3.0: Changed mouse controls for Wiimote-only
- -1.3.1: Added Wiimote-only mouse sensitivity changer
- -1.3.2: Added textart diagrams
- -1.3.3: Added chat messages module; Added first preprogrammed message
- -1.3.4: Optimized chat messages module; Optimized parts of the script
- Installing instructions:
- -------------------------
- 1. Go to http://pastebin.com/12345 (<-- this website -->)
- 2. Scroll down to a textbox with the title "RAW Paste Data"
- 3. Select everything in the textbox (Strg+a on Windows)
- 4. Copy everything
- 5. Open GlovePIE
- 6. Paste everything
- 7. Connect your wiimote
- 8. Click run!
- 9. Done
- NOTE:Some of your keys may be a bit buggy when the script is running!
- (Nothing serious, but I thought I should mention it.)
- Connecting instructions:
- -------------------------
- 1. Download and install a Bluetooth program
- (If you don't already have one)
- 2. Start your bluetooth programm
- 3. Locate a device called "joystick" or "Nintendo RVL-CNT-01"
- 4. Press 1+2 on your wiimote at the same time (the same as you do to to connect to your Wii)
- 5. Try to connect to it
- 5.5. You have to turn of "No Auto-Bluetooth Connect" in the troubleshooting menu of GlovePIE
- 6. Start the program
- 7. Wait about 2sec
- 8. If the lights on the wiimote keep flashing stop the script and repeat step 7-9
- 8.5. When your remote is connected the text next to the start/stop button will show some informations about battery, Nunchuck, etc.
- 9. If your remote is connected you may enable "No Auto-Bluetooth Connect" in the troubleshooting menu of GlovePIE to stabilize your connection (GlovePIE has to be running or you'll have to get back to step 4 and try again)
- 10.Have fun
- ############
- # OR #
- ############
- Connect via the bluetooth settings in your OS.(Windows 8 or higher).
- (Settings > Devices > Bleutooth > Search for devices!)
- NOTE: Just click "Next" when you are asked for a key.
- DO NOT enter a key!
- (Having 'No Auto-Bluetooth connect' activated might help stabilizing your connection!
- (GlovePIE > TroubleShooter > No Auto-Bluetooth connect) )
- Video example:
- https://www.youtube.com/watch?v=4DhWCvlB5dg
- (Please note, that this video does not belong to me.
- Nor am I associated with it's owner in any way or form.)
- ------
- |Keys|
- ------
- [Top]
- ---------------
- |(O) |
- | |
- | |-----| | \
- | | ^ | | \
- ||-- --|| \
- ||< >|| > Up, Down, Left and Right
- ||-- --|| /
- | | V | | /
- | |-----| | /
- | |
- | |
- | /---------\ |
- | | / \ | |
- | | /---\ | | -- A
- | | / \ | |
- | \---------/ |
- | |
- | |
- | |
- | |
- | |
- |(-) (⌂) (+)| -- Minus, Home and Plus
- | |
- | |
- | . . . . |
- | . . . . |
- | . . . . |
- | . . . . |
- | . . . . |
- | . . . . |
- | |
- | |
- | /---\ |
- | | 1 | | -- 1
- | \---/ |
- | |
- | |
- | /---\ |
- | | 2 | | -- 2
- | \---/ |
- | |
- | |
- | ■ ■ ■ ■ | -- Led 1-4
- ---------------
- [Back]
- ---------------
- | |
- | |
- | |
- | |---------| |
- | | | |
- | | | | -- B
- | | | |
- | | | |
- | |----B----| |
- | |
- | |
- | |
- |-------------|
- | |
- | [Battery] |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | O | --Sync (connection)
- |-------------|
- | |
- ---------------
- (Sorry for my poorly designed textart)
- With Nunchuck
- #############
- wii | Computer
- ---------------------
- A | Enter
- B | Right mouse button
- 1 | Scroll up
- 2 | Scroll down
- PLUS | Sensitivity +1
- MINUS | Sensitivity -1
- up | None (Feel free to send me suggestions)
- down | None (maybe chat messages)
- left | None
- right | None
- home | Escape
- [Nunchuck Controls]
- up | Up
- down | Uown
- left | Ueft
- right | Uight
- Z | LeftMouseButton
- C | Hold for mouse mode (Use Nunchuck to control your cursor)
- [combinations]
- 1+C | Voiceover for power level and
- | and sensitivity
- 2+C | Steam overlay (can be reconfigured below, default: Shift+Tab)
- C+Z+B | Backspace
- up+C | Chat Message 1 (messages below)
- down+C | WIP
- left+C | WIP
- right+C| WIP
- Chat message 1: Sry, I am playing on my wii remote, so I can not reply atm. PREPROGRAMMED MESSAGE
- Instant chat messages are used to chat with other players while using the Wiimote.
- Messages are instantly typed when the keys are pressed so beware!
- NOTE: To properly use those chat messages your system needs to be set to use a QWERTY keyboard!
- (Only necessary, if your keyboard doesn't have the letters Q,W,E,R and T in the same line.
- E.g. when using a German QWERTZ keyboard (like I do). )
- Without Nunchuck
- ################
- Hold your remote sideways!
- --------------------
- | + O : o o | (<-- poor textart of a Wiimote)
- --------------------
- A | Enter
- B | Right mouse button
- 1 | Left mouse button
- 2 | Hold for mouse mode (e.g. 2+Up -> Mouse Up)
- up (*) | Left
- down | Right
- left | Down
- right | Up
- home | Escape
- [combinations]
- B+2 | :) steering wheel Mode
- B+2+PLUS | Sensitivity +5 (Wii-Wheel)
- B+2+Minus| Sensitivity -5 (Wii-Wheel)
- 2+PLUS | Sensitivity +5 (Mouse)
- 2+Minus| Sensitivity -5 (Mouse)
- (*)When holding the remote as depicted in the diagrams (not sideways).
- When holding the remote sideways the directions arechanged to:
- Up > left
- Down > right
- Left > down
- Right > up
- Wiimote Leds
- Can be changed by modifying the commands below
- Example:
- wiimote.led1=false [off] / true [on]
- 1 2 3 4
- [*] [ ] [ ] [ ] */
- wiimote.led1 = true //1 on
- wiimote.led2 = true //2 on
- wiimote.led3 = true //3 on
- wiimote.led4 = true //4 on
- //Please do not modify the rest of the script
- //(If you are searching for the Steam settings, scroll down a bit)
- if (wiimote.hasNunchuck) then
- //------------------------------------------BEGIN NUNCHUCK CONTROLS-------------
- //Scrolling
- if ((Wiimote.One) and not (Nunchuck.C) )then
- Mouse.WheelUp=true
- wait(0.1)
- Mouse.WheelUp=false
- endif
- if ((Wiimote.two) and not (Nunchuck.C) )then
- Mouse.WheelDown=true
- wait(0.1)
- Mouse.WheelDown=false
- endif
- //Power Level Output
- if ((Nunchuck.C) and (Wiimote.One) )then
- say("Power Level is "+wiimote.Battery+"% "+"Sensitivity is "+var.scroll+" Running version "+var.version)
- endif
- //Nunchuck Mouse sensitivity
- if (var.scroll>0)then
- if (Wiimote.Plus)then
- var.scroll=var.scroll+1
- wait(0.2)
- else
- endif
- if (wiimote.Minus)then
- var.scroll=var.scroll-1
- wait(0.2)
- else
- endif
- else
- var.scroll=1
- endif
- //Debug text
- if (wiimote.Battery>0) then
- if(Nunchuck.C) then
- debug="Sensitivity: "+var.scroll
- else
- debug="Wiimote connected Power: "+wiimote.Battery+" Nunchuck connected: "+wiimote.HasNunchuk
- var.on=1
- endif
- else
- if (var.on=1) then debug="Wiimote disconnected" else debug="no wiimote connected"
- endif
- //Main Controls
- keyboard.Enter=wiimote.A
- mouse.RightButton = Wiimote.b
- Keyboard.Escape = Wiimote.Home
- /*
- ##################
- # STEAM SETTINGS #
- ##################
- Modify to adjust the keybinds to your settings in Steam.
- by default it is set to the default setting of the Steam for Windows.
- #To enable a certain key, remove the // in front on the Keyboard.etc Command.
- #To disable simply add // in front of the Command.
- #To add a key thats not supported, uncomment the following line
- and replace the [etc] with your key
- */
- //Keyboard.[etc]=((Nunchuck.C)and(Wiimote.Two))
- Keyboard.Tab=((Nunchuck.C)and(Wiimote.Two)) //Tab
- Keyboard.Shift=((Nunchuck.C)and(Wiimote.Two)) //Shift
- //Keyboard.Ctrl=((Nunchuck.C)and(Wiimote.Two)) //Ctrl
- //Please do not modify beyond this point!
- Keyboard.BackSpace=((Nunchuck.C)and(Wiimote.B)and(Nunchuck.Z))
- mouse.LeftButton=nunchuck.Z
- //Nunchuck Arrow Keys
- if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then Keyboard.up=false else Keyboard.up=nunchuck.up
- if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.down=false else keyboard.down= nunchuck.down
- if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.Right=false else keyboard.Right=nunchuck.Right
- if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.Left=false else keyboard.Left=nunchuck.Left
- //Nunchuck Mouse
- if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.up )then mouse.CursorPosY=mouse.CursorPosY-var.scroll
- if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.down )then mouse.CursorPosY=mouse.CursorPosY+var.scroll
- if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.left )then mouse.CursorPosX=mouse.CursorPosX-var.scroll
- if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.right)then mouse.CursorPosX=mouse.CursorPosX+var.scroll
- Keyboard.escape=wiimote.home
- //Message-Keys
- if (Wiimote.Up and Nunchuck.C) then
- //Sry,
- Keyboard.Shift=true
- Keyboard.S=true
- Keyboard.S=False
- Keyboard.Shift=false
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.y=true
- Keyboard.y=False
- Keyboard.Comma=true
- Keyboard.Comma=False
- Keyboard.Space=true
- Keyboard.Space=False
- //I'm
- Keyboard.Shift=true
- Keyboard.I=true
- Keyboard.I=False
- Keyboard.Shift=false
- Keyboard.Space=true
- Keyboard.space=False
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.M=true
- Keyboard.M=False
- Keyboard.Space=true
- Keyboard.Space=False
- //playing
- Keyboard.P=true
- Keyboard.P=False
- Keyboard.l=true
- Keyboard.l=False
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.y=true
- Keyboard.y=False
- Keyboard.I=true
- Keyboard.I=False
- Keyboard.n=true
- Keyboard.n=False
- Keyboard.g=true
- Keyboard.g=False
- Keyboard.Space=true
- Keyboard.Space=False
- //on
- Keyboard.o=true
- Keyboard.o=False
- Keyboard.n=true
- Keyboard.n=False
- Keyboard.Space=true
- Keyboard.Space=False
- //my
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.y=true
- Keyboard.y=False
- Keyboard.Space=true
- Keyboard.Space=False
- //wii remote
- Keyboard.w=true
- Keyboard.w=False
- Keyboard.I=true
- Keyboard.I=False
- Keyboard.I=true
- Keyboard.I=False
- Keyboard.Space=true
- Keyboard.Space=False
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.o=true
- Keyboard.o=False
- Keyboard.t=true
- Keyboard.t=False
- Keyboard.e=true
- Keyboard.e=False
- //, so
- Keyboard.Comma=true
- Keyboard.Comma=False
- Keyboard.Space=true
- Keyboard.Space=False
- Keyboard.S=true
- Keyboard.S=False
- Keyboard.o=true
- Keyboard.o=False
- Keyboard.Space=true
- Keyboard.Space=False
- // I can't
- Keyboard.Shift=true
- Keyboard.I=true
- Keyboard.I=False
- Keyboard.Shift=false
- Keyboard.Space=true
- Keyboard.Space=False
- Keyboard.c=true
- Keyboard.c=False
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.n=true
- Keyboard.N=False
- Keyboard.space=true
- Keyboard.Space=False
- Keyboard.n=true
- Keyboard.N=False
- Keyboard.o=true
- Keyboard.o=False
- Keyboard.t=true
- Keyboard.t=False
- Keyboard.Space=true
- Keyboard.Space=False
- //reply
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.p=true
- Keyboard.p=False
- Keyboard.l=true
- Keyboard.l=False
- Keyboard.y=true
- Keyboard.y=False
- Keyboard.Space=true
- Keyboard.Space=False
- //atm.
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.T=true
- Keyboard.T=False
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.Dot=true
- Keyboard.Dot=False
- //preprogrammed msg text
- Keyboard.Shift=true
- Keyboard.Space=true
- Keyboard.Space=False
- Keyboard.p=true
- Keyboard.p=False
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.p=true
- Keyboard.p=False
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.o=true
- Keyboard.o=False
- Keyboard.g=true
- Keyboard.g=False
- Keyboard.r=true
- Keyboard.r=False
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.d=true
- Keyboard.d=False
- Keyboard.Space=true
- Keyboard.Space=False
- Keyboard.m=true
- Keyboard.m=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.s=true
- Keyboard.s=False
- Keyboard.s=true
- Keyboard.s=False
- Keyboard.a=true
- Keyboard.a=False
- Keyboard.g=true
- Keyboard.g=False
- Keyboard.e=true
- Keyboard.e=False
- Keyboard.Shift=false
- wait(0.4)
- endif
- else
- //-----------------------------------BEGIN NON-NUNCHUCK CONTROLS---------------
- //Debug fiel info
- if (wiimote.Battery>0) then
- debug="Wiimote connected Power: "+wiimote.Battery+" Nunchuck connected: "+wiimote.HasNunchuk
- var.on=1
- else
- if (var.on=1) then debug="Wiimote disconnected" else debug="no wiimote connected"
- endif
- //Main Controls
- keyboard.Enter=wiimote.A
- mouse.LeftButton = Wiimote.one
- mouse.RightButton = Wiimote.b and not wiimote.Two
- Keyboard.Escape = Wiimote.Home
- Keyboard.Up =wiimote.Right and not wiimote.Two
- Keyboard.Down=wiimote.left and not wiimote.Two
- Keyboard.left = Wiimote.up and not wiimote.Two
- Keyboard.right = wiimote.down and not wiimote.Two
- //Mouse Controls (changed in 1.3.0!)
- if (Wiimote.Right and wiimote.Two) then
- mouse.CursorPosY=mouse.CursorPosY-var.Mouse
- endif
- if (Wiimote.Left and wiimote.Two) then
- mouse.CursorPosY=mouse.CursorPosY+var.Mouse
- endif
- if (Wiimote.Down and wiimote.Two) then
- mouse.CursorPosX=mouse.CursorPosX+var.Mouse
- endif
- if (Wiimote.Up and wiimote.Two) then
- mouse.CursorPosX=mouse.CursorPosX-var.Mouse
- endif
- //Debug Mouse sensitivity
- if (wiimote.Two and not wiimote.B)then
- debug="Mouse sensitivity: "+var.Mouse
- endif
- //Mouse sensitivity
- if (var.sens>0) then
- if (wiimote.Plus and wiimote.Two and not wiimote.B) then
- var.Mouse=var.Mouse+1
- wait(0.2)
- endif
- if (wiimote.Minus and wiimote.Two and not wiimote.B) then
- var.Mouse=var.Mouse-1
- wait(0.2)
- endif
- else
- var.Mouse=4
- endif
- //Debug Wii-Wheel sensitivity
- if (wiimote.B and wiimote.two) then
- debug="Wii-Wheel sensitivity: "+var.sens
- endif
- //Wii-Weel sensitivity
- if (var.sens>0) then
- if (wiimote.Plus and wiimote.Two and wiimote.B) then
- var.sens=var.sens-5
- wait(0.2)
- endif
- if (wiimote.Minus and wiimote.Two and wiimote.B) then
- var.sens=var.sens+5
- wait(0.2)
- endif
- else
- var.sens=15
- endif
- if (wiimote.B) and (wiimote.Two)then
- if (Wiimote.SteeringAngle < var.sens degrees and Wiimote.SteeringAngle < -15 degrees) then
- keyboard.Left=true
- else
- Keyboard.Left=false
- endif
- if ((not Wiimote.SteeringAngle < var.sens degrees) and (not Wiimote.SteeringAngle < -15 degrees)) then
- keyboard.right=true
- else
- Keyboard.right=false
- endif
- endif
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement