sync1211

Wii-Remote/Wiimote Audiosurf V2

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