Advertisement
sync1211

Wii-Remote/Wiimote Audiosurf V2

Jun 22nd, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.80 KB | None | 0 0
  1. /*
  2. ###################################
  3. # Wii Remote Audiosurf Controller #
  4. ###################################
  5.  
  6. by sync1211
  7.  
  8. compatible with
  9. -Audiosurf2
  10. -Audiosurf1 (probably)
  11. -Desktop/Surfing
  12. -Steam
  13.  
  14. ###########!IMPORTANT!###########
  15. read the text throughout the script
  16. for a tutorial and custom keybinds
  17.  
  18. if you aren't sure how to use this script you can send me an email at
  19. dpf12110@gmail.com
  20.  
  21. or on Steam:
  22. http://steamcommunity.com/id/sync1211
  23. (Also, if you have ideas or want something changed. I REALLY NEED MORE FEEDBACK!)
  24.  
  25. #################################
  26. */
  27. var.version="1.3.4"
  28.  
  29. //Framerate of this script
  30. PIE.FrameRate=120Hz
  31. /*
  32. Version 1.3.4
  33. For Questions please write an email to dpf12110@gmail.com
  34. (Also if you need help connecting the remote to your PC)
  35. This script requires GlovePIE to run
  36. get it at http://glovepie.org/
  37. Feel free to send me your IDEAS or FEEDBACK!
  38.  
  39.  
  40. How to use:
  41.  
  42. 1.Connect your Wii remote via bluetooth (instructions below)
  43. 2.Start this script (installing instructions below)
  44. 3.Have fun!
  45.  
  46. Note: If you are connected and have this script running, all the lights on the remote should light up.
  47. (Exept, if you have changed the led configuration found below)
  48. It can be used with either Nunchuck, Wii-Wheel or with only the Wiimote.
  49. It uses mouse and keyboard keys and has been tested for months.
  50.  
  51.  
  52. Suggestions by
  53. ---------------
  54. -dpf1110 (http://steamcommunity.com/id/dpf1110)
  55.  
  56.  
  57. (Everyone who gave me suggestions is listed here)
  58.  
  59.  
  60.  
  61. Tested by:
  62. ----------
  63. -sync1211(me)
  64. -dpf1110(my brother)
  65.  
  66.  
  67. (Everyone who tested the script during development is listed here)
  68.  
  69.  
  70.  
  71. Changelog:
  72. ---------
  73. -0.0.2: Added new features
  74. -1.0.1: Release
  75. -1.1.0: Added scrolling support
  76. -1.2.0: Wii-Wheel support
  77. -1.2.1: Added Wii-Wheel sensitivity changer
  78. -1.3.0: Changed mouse controls for Wiimote-only
  79. -1.3.1: Added Wiimote-only mouse sensitivity changer
  80. -1.3.2: Added textart diagrams
  81. -1.3.3: Added chat messages module; Added first preprogrammed message
  82. -1.3.4: Optimized chat messages module; Optimized parts of the script
  83.  
  84.  
  85. Installing instructions:
  86. -------------------------
  87. 1. Go to http://pastebin.com/12345 (<-- this website -->)
  88. 2. Scroll down to a textbox with the title "RAW Paste Data"
  89. 3. Select everything in the textbox (Strg+a on Windows)
  90. 4. Copy everything
  91. 5. Open GlovePIE
  92. 6. Paste everything
  93. 7. Connect your wiimote
  94. 8. Click run!
  95. 9. Done
  96.  
  97.  
  98. NOTE:Some of your keys may be a bit buggy when the script is running!
  99. (Nothing serious, but I thought I should mention it.)
  100.  
  101. Connecting instructions:
  102. -------------------------
  103.  
  104. 1. Download and install a Bluetooth program
  105. (If you don't already have one)
  106. 2. Start your bluetooth programm
  107. 3. Locate a device called "joystick" or "Nintendo RVL-CNT-01"
  108. 4. Press 1+2 on your wiimote at the same time (the same as you do to to connect to your Wii)
  109. 5. Try to connect to it
  110. 5.5. You have to turn of "No Auto-Bluetooth Connect" in the troubleshooting menu of GlovePIE
  111. 6. Start the program
  112. 7. Wait about 2sec
  113. 8. If the lights on the wiimote keep flashing stop the script and repeat step 7-9
  114. 8.5. When your remote is connected the text next to the start/stop button will show some informations about battery, Nunchuck, etc.
  115. 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)
  116. 10.Have fun
  117.  
  118. ############
  119. # OR #
  120. ############
  121. Connect via the bluetooth settings in your OS.(Windows 8 or higher).
  122. (Settings > Devices > Bleutooth > Search for devices!)
  123. NOTE: Just click "Next" when you are asked for a key.
  124. DO NOT enter a key!
  125. (Having 'No Auto-Bluetooth connect' activated might help stabilizing your connection!
  126. (GlovePIE > TroubleShooter > No Auto-Bluetooth connect) )
  127.  
  128. Video example:
  129. https://www.youtube.com/watch?v=4DhWCvlB5dg
  130. (Please note, that this video does not belong to me.
  131. Nor am I associated with it's owner in any way or form.)
  132.  
  133.  
  134. ------
  135. |Keys|
  136. ------
  137.  
  138. [Top]
  139. ---------------
  140. |(O) |
  141. | |
  142. | |-----| | \
  143. | | ^ | | \
  144. ||-- --|| \
  145. ||< >|| > Up, Down, Left and Right
  146. ||-- --|| /
  147. | | V | | /
  148. | |-----| | /
  149. | |
  150. | |
  151. | /---------\ |
  152. | | / \ | |
  153. | | /---\ | | -- A
  154. | | / \ | |
  155. | \---------/ |
  156. | |
  157. | |
  158. | |
  159. | |
  160. | |
  161. |(-) (⌂) (+)| -- Minus, Home and Plus
  162. | |
  163. | |
  164. | . . . . |
  165. | . . . . |
  166. | . . . . |
  167. | . . . . |
  168. | . . . . |
  169. | . . . . |
  170. | |
  171. | |
  172. | /---\ |
  173. | | 1 | | -- 1
  174. | \---/ |
  175. | |
  176. | |
  177. | /---\ |
  178. | | 2 | | -- 2
  179. | \---/ |
  180. | |
  181. | |
  182. | ■ ■ ■ ■ | -- Led 1-4
  183. ---------------
  184.  
  185.  
  186. [Back]
  187. ---------------
  188. | |
  189. | |
  190. | |
  191. | |---------| |
  192. | | | |
  193. | | | | -- B
  194. | | | |
  195. | | | |
  196. | |----B----| |
  197. | |
  198. | |
  199. | |
  200. |-------------|
  201. | |
  202. | [Battery] |
  203. | |
  204. | |
  205. | |
  206. | |
  207. | |
  208. | |
  209. | |
  210. | |
  211. | |
  212. | |
  213. | |
  214. | |
  215. | |
  216. | |
  217. | |
  218. | |
  219. | |
  220. | |
  221. | |
  222. | |
  223. | |
  224. | |
  225. | |
  226. | |
  227. | |
  228. | O | --Sync (connection)
  229. |-------------|
  230. | |
  231. ---------------
  232.  
  233. (Sorry for my poorly designed textart)
  234.  
  235.  
  236.  
  237. With Nunchuck
  238. #############
  239.  
  240. wii | Computer
  241. ---------------------
  242. A | Enter
  243. B | Right mouse button
  244. 1 | Scroll up
  245. 2 | Scroll down
  246. PLUS | Sensitivity +1
  247. MINUS | Sensitivity -1
  248. up | None (Feel free to send me suggestions)
  249. down | None (maybe chat messages)
  250. left | None
  251. right | None
  252. home | Escape
  253. [Nunchuck Controls]
  254. up | Up
  255. down | Uown
  256. left | Ueft
  257. right | Uight
  258. Z | LeftMouseButton
  259. C | Hold for mouse mode (Use Nunchuck to control your cursor)
  260. [combinations]
  261. 1+C | Voiceover for power level and
  262. | and sensitivity
  263. 2+C | Steam overlay (can be reconfigured below, default: Shift+Tab)
  264. C+Z+B | Backspace
  265. up+C | Chat Message 1 (messages below)
  266. down+C | WIP
  267. left+C | WIP
  268. right+C| WIP
  269.  
  270. Chat message 1: Sry, I am playing on my wii remote, so I can not reply atm. PREPROGRAMMED MESSAGE
  271.  
  272. Instant chat messages are used to chat with other players while using the Wiimote.
  273. Messages are instantly typed when the keys are pressed so beware!
  274. NOTE: To properly use those chat messages your system needs to be set to use a QWERTY keyboard!
  275. (Only necessary, if your keyboard doesn't have the letters Q,W,E,R and T in the same line.
  276. E.g. when using a German QWERTZ keyboard (like I do). )
  277.  
  278. Without Nunchuck
  279. ################
  280. Hold your remote sideways!
  281. --------------------
  282. | + O : o o | (<-- poor textart of a Wiimote)
  283. --------------------
  284.  
  285. A | Enter
  286. B | Right mouse button
  287. 1 | Left mouse button
  288. 2 | Hold for mouse mode (e.g. 2+Up -> Mouse Up)
  289. up (*) | Left
  290. down | Right
  291. left | Down
  292. right | Up
  293. home | Escape
  294. [combinations]
  295. B+2 | :) steering wheel Mode
  296. B+2+PLUS | Sensitivity +5 (Wii-Wheel)
  297. B+2+Minus| Sensitivity -5 (Wii-Wheel)
  298. 2+PLUS | Sensitivity +5 (Mouse)
  299. 2+Minus| Sensitivity -5 (Mouse)
  300.  
  301. (*)When holding the remote as depicted in the diagrams (not sideways).
  302. When holding the remote sideways the directions arechanged to:
  303. Up > left
  304. Down > right
  305. Left > down
  306. Right > up
  307.  
  308.  
  309.  
  310. Wiimote Leds
  311. Can be changed by modifying the commands below
  312. Example:
  313.  
  314.  
  315. wiimote.led1=false [off] / true [on]
  316. 1 2 3 4
  317. [*] [ ] [ ] [ ] */
  318. wiimote.led1 = true //1 on
  319. wiimote.led2 = true //2 on
  320. wiimote.led3 = true //3 on
  321. wiimote.led4 = true //4 on
  322.  
  323.  
  324. //Please do not modify the rest of the script
  325. //(If you are searching for the Steam settings, scroll down a bit)
  326.  
  327.  
  328. if (wiimote.hasNunchuck) then
  329. //------------------------------------------BEGIN NUNCHUCK CONTROLS-------------
  330.  
  331. //Scrolling
  332. if ((Wiimote.One) and not (Nunchuck.C) )then
  333. Mouse.WheelUp=true
  334. wait(0.1)
  335. Mouse.WheelUp=false
  336. endif
  337.  
  338. if ((Wiimote.two) and not (Nunchuck.C) )then
  339. Mouse.WheelDown=true
  340. wait(0.1)
  341. Mouse.WheelDown=false
  342. endif
  343.  
  344. //Power Level Output
  345. if ((Nunchuck.C) and (Wiimote.One) )then
  346. say("Power Level is "+wiimote.Battery+"% "+"Sensitivity is "+var.scroll+" Running version "+var.version)
  347. endif
  348.  
  349. //Nunchuck Mouse sensitivity
  350. if (var.scroll>0)then
  351.  
  352. if (Wiimote.Plus)then
  353. var.scroll=var.scroll+1
  354. wait(0.2)
  355. else
  356. endif
  357. if (wiimote.Minus)then
  358. var.scroll=var.scroll-1
  359. wait(0.2)
  360. else
  361. endif
  362.  
  363. else
  364. var.scroll=1
  365. endif
  366.  
  367. //Debug text
  368. if (wiimote.Battery>0) then
  369. if(Nunchuck.C) then
  370. debug="Sensitivity: "+var.scroll
  371. else
  372. debug="Wiimote connected Power: "+wiimote.Battery+" Nunchuck connected: "+wiimote.HasNunchuk
  373. var.on=1
  374. endif
  375. else
  376. if (var.on=1) then debug="Wiimote disconnected" else debug="no wiimote connected"
  377. endif
  378.  
  379. //Main Controls
  380. keyboard.Enter=wiimote.A
  381. mouse.RightButton = Wiimote.b
  382. Keyboard.Escape = Wiimote.Home
  383.  
  384. /*
  385. ##################
  386. # STEAM SETTINGS #
  387. ##################
  388.  
  389. Modify to adjust the keybinds to your settings in Steam.
  390. by default it is set to the default setting of the Steam for Windows.
  391. #To enable a certain key, remove the // in front on the Keyboard.etc Command.
  392. #To disable simply add // in front of the Command.
  393. #To add a key thats not supported, uncomment the following line
  394. and replace the [etc] with your key
  395. */
  396.  
  397. //Keyboard.[etc]=((Nunchuck.C)and(Wiimote.Two))
  398.  
  399. Keyboard.Tab=((Nunchuck.C)and(Wiimote.Two)) //Tab
  400. Keyboard.Shift=((Nunchuck.C)and(Wiimote.Two)) //Shift
  401. //Keyboard.Ctrl=((Nunchuck.C)and(Wiimote.Two)) //Ctrl
  402.  
  403.  
  404. //Please do not modify beyond this point!
  405. Keyboard.BackSpace=((Nunchuck.C)and(Wiimote.B)and(Nunchuck.Z))
  406.  
  407. mouse.LeftButton=nunchuck.Z
  408. //Nunchuck Arrow Keys
  409. if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then Keyboard.up=false else Keyboard.up=nunchuck.up
  410. if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.down=false else keyboard.down= nunchuck.down
  411. if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.Right=false else keyboard.Right=nunchuck.Right
  412. if (nunchuck.C)and not((Wiimote.One) and (Wiimote.Two)) then keyboard.Left=false else keyboard.Left=nunchuck.Left
  413. //Nunchuck Mouse
  414. if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.up )then mouse.CursorPosY=mouse.CursorPosY-var.scroll
  415. if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.down )then mouse.CursorPosY=mouse.CursorPosY+var.scroll
  416. if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.left )then mouse.CursorPosX=mouse.CursorPosX-var.scroll
  417. if (nunchuck.c)and not((Wiimote.One) and (Wiimote.Two))then if(nunchuck.right)then mouse.CursorPosX=mouse.CursorPosX+var.scroll
  418.  
  419. Keyboard.escape=wiimote.home
  420.  
  421. //Message-Keys
  422.  
  423. if (Wiimote.Up and Nunchuck.C) then
  424. //Sry,
  425. Keyboard.Shift=true
  426. Keyboard.S=true
  427. Keyboard.S=False
  428. Keyboard.Shift=false
  429.  
  430. Keyboard.r=true
  431. Keyboard.r=False
  432.  
  433. Keyboard.y=true
  434. Keyboard.y=False
  435.  
  436. Keyboard.Comma=true
  437. Keyboard.Comma=False
  438.  
  439. Keyboard.Space=true
  440. Keyboard.Space=False
  441.  
  442. //I'm
  443. Keyboard.Shift=true
  444. Keyboard.I=true
  445. Keyboard.I=False
  446. Keyboard.Shift=false
  447.  
  448. Keyboard.Space=true
  449. Keyboard.space=False
  450.  
  451. Keyboard.a=true
  452. Keyboard.a=False
  453.  
  454. Keyboard.M=true
  455. Keyboard.M=False
  456.  
  457. Keyboard.Space=true
  458. Keyboard.Space=False
  459.  
  460. //playing
  461. Keyboard.P=true
  462. Keyboard.P=False
  463.  
  464. Keyboard.l=true
  465. Keyboard.l=False
  466.  
  467. Keyboard.a=true
  468. Keyboard.a=False
  469.  
  470. Keyboard.y=true
  471. Keyboard.y=False
  472.  
  473. Keyboard.I=true
  474. Keyboard.I=False
  475.  
  476. Keyboard.n=true
  477. Keyboard.n=False
  478.  
  479. Keyboard.g=true
  480. Keyboard.g=False
  481.  
  482. Keyboard.Space=true
  483. Keyboard.Space=False
  484.  
  485. //on
  486. Keyboard.o=true
  487. Keyboard.o=False
  488.  
  489. Keyboard.n=true
  490. Keyboard.n=False
  491.  
  492. Keyboard.Space=true
  493. Keyboard.Space=False
  494.  
  495. //my
  496. Keyboard.m=true
  497. Keyboard.m=False
  498.  
  499. Keyboard.y=true
  500. Keyboard.y=False
  501.  
  502. Keyboard.Space=true
  503. Keyboard.Space=False
  504.  
  505. //wii remote
  506. Keyboard.w=true
  507. Keyboard.w=False
  508.  
  509. Keyboard.I=true
  510. Keyboard.I=False
  511.  
  512. Keyboard.I=true
  513. Keyboard.I=False
  514.  
  515. Keyboard.Space=true
  516. Keyboard.Space=False
  517.  
  518. Keyboard.r=true
  519. Keyboard.r=False
  520.  
  521. Keyboard.e=true
  522. Keyboard.e=False
  523.  
  524. Keyboard.m=true
  525. Keyboard.m=False
  526.  
  527. Keyboard.o=true
  528. Keyboard.o=False
  529.  
  530. Keyboard.t=true
  531. Keyboard.t=False
  532.  
  533. Keyboard.e=true
  534. Keyboard.e=False
  535.  
  536. //, so
  537. Keyboard.Comma=true
  538. Keyboard.Comma=False
  539.  
  540. Keyboard.Space=true
  541. Keyboard.Space=False
  542.  
  543. Keyboard.S=true
  544. Keyboard.S=False
  545.  
  546. Keyboard.o=true
  547. Keyboard.o=False
  548.  
  549. Keyboard.Space=true
  550. Keyboard.Space=False
  551.  
  552. // I can't
  553. Keyboard.Shift=true
  554. Keyboard.I=true
  555. Keyboard.I=False
  556. Keyboard.Shift=false
  557.  
  558. Keyboard.Space=true
  559. Keyboard.Space=False
  560.  
  561. Keyboard.c=true
  562. Keyboard.c=False
  563.  
  564. Keyboard.a=true
  565. Keyboard.a=False
  566.  
  567. Keyboard.n=true
  568. Keyboard.N=False
  569.  
  570. Keyboard.space=true
  571. Keyboard.Space=False
  572.  
  573. Keyboard.n=true
  574. Keyboard.N=False
  575.  
  576. Keyboard.o=true
  577. Keyboard.o=False
  578.  
  579. Keyboard.t=true
  580. Keyboard.t=False
  581.  
  582. Keyboard.Space=true
  583. Keyboard.Space=False
  584.  
  585. //reply
  586. Keyboard.r=true
  587. Keyboard.r=False
  588.  
  589. Keyboard.e=true
  590. Keyboard.e=False
  591.  
  592. Keyboard.p=true
  593. Keyboard.p=False
  594.  
  595. Keyboard.l=true
  596. Keyboard.l=False
  597.  
  598. Keyboard.y=true
  599. Keyboard.y=False
  600.  
  601. Keyboard.Space=true
  602. Keyboard.Space=False
  603.  
  604. //atm.
  605. Keyboard.a=true
  606. Keyboard.a=False
  607.  
  608. Keyboard.T=true
  609. Keyboard.T=False
  610.  
  611. Keyboard.m=true
  612. Keyboard.m=False
  613.  
  614. Keyboard.Dot=true
  615. Keyboard.Dot=False
  616.  
  617. //preprogrammed msg text
  618. Keyboard.Shift=true
  619.  
  620. Keyboard.Space=true
  621. Keyboard.Space=False
  622.  
  623. Keyboard.p=true
  624. Keyboard.p=False
  625.  
  626. Keyboard.r=true
  627. Keyboard.r=False
  628.  
  629. Keyboard.e=true
  630. Keyboard.e=False
  631.  
  632. Keyboard.p=true
  633. Keyboard.p=False
  634.  
  635. Keyboard.r=true
  636. Keyboard.r=False
  637.  
  638. Keyboard.o=true
  639. Keyboard.o=False
  640.  
  641. Keyboard.g=true
  642. Keyboard.g=False
  643.  
  644. Keyboard.r=true
  645. Keyboard.r=False
  646.  
  647. Keyboard.a=true
  648. Keyboard.a=False
  649.  
  650. Keyboard.m=true
  651. Keyboard.m=False
  652.  
  653. Keyboard.m=true
  654. Keyboard.m=False
  655.  
  656. Keyboard.e=true
  657. Keyboard.e=False
  658.  
  659. Keyboard.d=true
  660. Keyboard.d=False
  661.  
  662. Keyboard.Space=true
  663. Keyboard.Space=False
  664.  
  665. Keyboard.m=true
  666. Keyboard.m=False
  667.  
  668. Keyboard.e=true
  669. Keyboard.e=False
  670.  
  671. Keyboard.s=true
  672. Keyboard.s=False
  673.  
  674. Keyboard.s=true
  675. Keyboard.s=False
  676.  
  677. Keyboard.a=true
  678. Keyboard.a=False
  679.  
  680. Keyboard.g=true
  681. Keyboard.g=False
  682.  
  683. Keyboard.e=true
  684. Keyboard.e=False
  685.  
  686. Keyboard.Shift=false
  687. wait(0.4)
  688. endif
  689.  
  690.  
  691. else
  692. //-----------------------------------BEGIN NON-NUNCHUCK CONTROLS---------------
  693.  
  694. //Debug fiel info
  695.  
  696. if (wiimote.Battery>0) then
  697. debug="Wiimote connected Power: "+wiimote.Battery+" Nunchuck connected: "+wiimote.HasNunchuk
  698. var.on=1
  699. else
  700. if (var.on=1) then debug="Wiimote disconnected" else debug="no wiimote connected"
  701. endif
  702.  
  703.  
  704. //Main Controls
  705. keyboard.Enter=wiimote.A
  706. mouse.LeftButton = Wiimote.one
  707. mouse.RightButton = Wiimote.b and not wiimote.Two
  708. Keyboard.Escape = Wiimote.Home
  709. Keyboard.Up =wiimote.Right and not wiimote.Two
  710. Keyboard.Down=wiimote.left and not wiimote.Two
  711. Keyboard.left = Wiimote.up and not wiimote.Two
  712. Keyboard.right = wiimote.down and not wiimote.Two
  713.  
  714.  
  715. //Mouse Controls (changed in 1.3.0!)
  716. if (Wiimote.Right and wiimote.Two) then
  717. mouse.CursorPosY=mouse.CursorPosY-var.Mouse
  718. endif
  719.  
  720. if (Wiimote.Left and wiimote.Two) then
  721. mouse.CursorPosY=mouse.CursorPosY+var.Mouse
  722. endif
  723.  
  724. if (Wiimote.Down and wiimote.Two) then
  725. mouse.CursorPosX=mouse.CursorPosX+var.Mouse
  726. endif
  727.  
  728. if (Wiimote.Up and wiimote.Two) then
  729. mouse.CursorPosX=mouse.CursorPosX-var.Mouse
  730. endif
  731.  
  732. //Debug Mouse sensitivity
  733. if (wiimote.Two and not wiimote.B)then
  734. debug="Mouse sensitivity: "+var.Mouse
  735. endif
  736.  
  737. //Mouse sensitivity
  738. if (var.sens>0) then
  739.  
  740. if (wiimote.Plus and wiimote.Two and not wiimote.B) then
  741. var.Mouse=var.Mouse+1
  742. wait(0.2)
  743. endif
  744.  
  745. if (wiimote.Minus and wiimote.Two and not wiimote.B) then
  746. var.Mouse=var.Mouse-1
  747. wait(0.2)
  748. endif
  749. else
  750. var.Mouse=4
  751. endif
  752.  
  753. //Debug Wii-Wheel sensitivity
  754. if (wiimote.B and wiimote.two) then
  755. debug="Wii-Wheel sensitivity: "+var.sens
  756. endif
  757.  
  758. //Wii-Weel sensitivity
  759. if (var.sens>0) then
  760.  
  761. if (wiimote.Plus and wiimote.Two and wiimote.B) then
  762. var.sens=var.sens-5
  763. wait(0.2)
  764. endif
  765.  
  766. if (wiimote.Minus and wiimote.Two and wiimote.B) then
  767. var.sens=var.sens+5
  768. wait(0.2)
  769. endif
  770. else
  771. var.sens=15
  772. endif
  773.  
  774.  
  775.  
  776. if (wiimote.B) and (wiimote.Two)then
  777.  
  778. if (Wiimote.SteeringAngle < var.sens degrees and Wiimote.SteeringAngle < -15 degrees) then
  779. keyboard.Left=true
  780. else
  781. Keyboard.Left=false
  782. endif
  783.  
  784.  
  785.  
  786. if ((not Wiimote.SteeringAngle < var.sens degrees) and (not Wiimote.SteeringAngle < -15 degrees)) then
  787. keyboard.right=true
  788. else
  789. Keyboard.right=false
  790. endif
  791.  
  792. endif
  793.  
  794. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement