My quest to find a good wireless bluetooth controller has lead me to one I already had. My Wiimote!
Some very bright people have been working on programs to integrate the wiimote as a pc controller and I have been messing with it for awhile now and it works GREAT!
This should appeal to anybody with a Home Theater PC, Tech Geeks, Wii Owners, somebody who seeks a bluetooth controller, and more.
Applications for use are very large, I have used it as a SNES controller for emulation, a mouse for web browsing, a media controller for WMP & Winamp , and I still plan to try a lot more things.
It would be good as a pc gamepad too, or you could be creative and do say a power point presentation with it.
So.....
What you Need
________________________
> A Wiimote - Your Wii Controller
> A compatible bluetooth connection - More on this later
- I use AZiO BTD603-132 USB 2.0 Bluetooth Adapter - Probably one of the best you can buy and it works perfectly!
> Glovepie - http://carl.kenner.googlepages.com/glovepie - The very core of how it all works, a program that interprets all the wiimote signals and turns them into pc commands.
What you may Want
_________________________
> The nunchuck or classic controller connections for the wiimote - to give you more buttons and options
> A Wii sensor bar or some form of sensor bar - So you can use the pointing feature of the Wiimote (you can build one yourself I will have a guide on this later)
> PPjoy - http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm - Allows you to emulate a computer joystick/gamepad would be good for PC game use or certain emulators.
> BlueSoleil - http://www.bluesoleil.com/download/ - A free trial 3rd party bluetooth stack that seems to work much better than the stock microsoft one.
> Widdcom - http://www.broadcom.com/products/bluetooth_update.php - Another bluetooth stack that many have said works perfectly, a good alternative to MS drivers and made to work with broadcom hardware.
> Pinnacle Game Profiler - http://www.pinnaclegameprofiler.com/ - A program that adds gamepad support to any game, via letting you give keyboard commands to any gamepad, but recently they caught onto the wiimote craze and started to implement the wiimote. v4.40 now supports everything except IR and thats supposed to come next version. Its a work in process and I didnt get it to work for me yet but this may very well be the future alternative to PPJoy if you use a x64 based OS.
How it works & Pairing your Wiimote
_________________________
So if you did not already know, the Wiimote communicates with the Wii via bluetooth, the same technology many of us have in our laptops and pc's so the first hurdle to do this is already done by Nintendo. You can actually pair a Wiimote to your computer very easy with no mods or special software.
It works perfect for me on my Asus C90S with its internal BT card & the Toshiba BT stack.
To pair the Wiimote you hold the 1 & 2 buttons down and the LEDS with flash letting you know its in pairing mode, hold them down the entire pairing process and search for BT devices on your computer. A Wiimote will show up as Nintendo RVL - CNT -01 I believe the 01 will change one digit for each additional Wiimote you pair, so yes its totally possible to use 2 controllers at once for 2 player games.
This is what it looks like for me using the Toshiba BT stack since I have already added the device in the past and saved it:
![]()
When you have actually connected to the device and are currently paired with it, it will look like this:
![]()
Now the BT Stack is the software side of things, this is the Toshiba stack. Lucky for you guys I think most laptops come with this so your steps will be the same, however if you do use a different one (mostly the Microsoft Stack is the other main one) then your interface will be totally different.
Well, Congratulations your Wiimote is now tied to your computer! However its totally useless at this point and wont do anything.
Thats because the Wiimote has no PC drivers or any kind of communication that the PC understands, so thats where Glovepie comes in. So still this is the Pairing section and there is still a lot to know about this step because for many this may be the first problem you run into.
-NOT EVERY BLUETOOTH DEVICE IS COMPATIBLE WITH THE WIIMOTE-
Just like many other things bluetooth, wireless headphones ect, some older adapters wont work, and in the case of the wiimote it seems to be even more sensitive to what it wants to work with.
Here is the best resource I can offer you for now: http://wiibrew.org/index.php?title=List_of_Working_Bluetooth_Devices also try http://www.wiili.org/index.php/Compatible_Bluetooth_Devices
A list of devices confirmed to have worked for others, 99% of these people are doing this on there PC with a USB Bluetooth adapter, maybe you will all be lucky and have it work with your laptops internal card.
My personal observation is that its the BT Stack that is causing the most problems, the MS stack doesn't work for a lot of people so they are manually using a free trial of a BT Stack called BlueSoleil ( http://www.bluesoleil.com/download/). Its working for most people it seems, but a few have problems with it. However I have not seen any failed reports for the Toshiba Stack, the one I use. Thing is for those PC guys that stack cost 60$, but for me it was part of my software for my laptop so you may have it too.
(Vicious Notes: I just purchased this off newegg for my home pc: http://www.newegg.com/Product/Product.aspx?Item=N82E16833340002 Its very highly rated, comes with the Toshiba Stack, and I have read a review or 2 inside newegg where somebody said it works with the wiimote, but its not in that confirmed list above. After I get it if it works I will let you guys know)
So if you got past this first step and have your Wiimote paired we can move to step 2.
Using Glovepie
________________________________________
Download it from the above link and extract it. This is an ingenious program that allows custom script to be written to give the wiimote input a secific pc command. Version 3.0 at the time of writing this has full support for the nunchuck & classic controller, full support for everything the Wiimote does, pointing, tilt, accelerometer, leds, speaker, vibrate, buttons ect. What you can do with the script is only a limit of your skills and imagination.
I cant teach you much in this area because I am not a script witter or programmer but I am learning. So the resources I use I shall share with you.
Wiili.org - has a wiki type setup with some scripts there and a great forum ( http://www.wiili.org/forum/) you can learn a lot there or just use existing scripts from other users.
Google - use some common sense with your search like "wiimote scripts pc" or "glovepie scripts" and you can find many more pages, a good example of one I just found that did me good was..
Square Pheonix - http://www.squarephoenix.com/?v=glovepie_scripts he only has a few scripts on there but man are they good! He had exactly what I needed to know to use my nunchuck analog stick like a d-pad for my snes emulator. So I actually just made my first script that I will share with you guys somewhere below. Also he has a perfect PPjoy script to use with PPjoy to have a fully functional windows gamepad.
Explore and learn here guys, share your scripts with the rest of the forum if you make any good discoveries. I did not think at first the Wiimote could be a good controller because the lack of buttons, but you can easily do things like assign a roll or shake of the controller to a button, or even do combo buttons say press A on the wiimote to use the keyboard X key, but hold B and press A on the Wiimote to press the enter key, A combo key setup like that can easily double your button count, and you could even do a triple button combo, its all script so its fully programmable.
So here is an example my first script -
Just copy & paste it into a new script window in glovepie I call it VicousXUSMC-SNES-Nunchuck as the file name but I just gave the script rather than a .pie file (the format glovepie uses)Code:Left = -2 < Wiimote1.Nunchuk.JoyX < -0.4 Right = 2 > Wiimote1.Nunchuk.JoyX > 0.4 Up = -2 < Wiimote1.Nunchuk.JoyY < -0.4 Down = 2 > Wiimote1.Nunchuk.JoyY > 0.4 Key.Y = Wiimote1.Left Key.A = Wiimote1.Right Key.B = Wiimote1.Down Key.R = Wiimote1.B Key.L = Wiimote1.Nunchuk.ZButton Key.Comma = Wiimote1.Minus Key.Dot = Wiimote1.Plus Key.X = Wiimote1.Up
Its designed to be a SNES controller inside my emulator Zsnes, holding the nunchuck & wiimote the analog stick is the d-pad, the dpad on the wimote is the 4 face buttons of the snes controller, the z button on the back of the chuck is the L button, and the B button on the back of the wiimote for the R, then I use +/- for start and select. Its very close to using an actual SNES controller so thats why I did it this way. You have to map my keyboard settings in Zsnes but I just matched keyboard keys to snes key names for ease of setup. It works great and I was just playing secret of mana abit ago with it. I will make a video of it in action when I get the time.
This is just the initial post of the guide to get it on the map, I will add more detail, answer questions, try to make some videos, post good scripts, ect on a continual basis over time as long as I find anybody interested in the information.
There are NO bluetooth controllers for the PC out there, I searched and the only one I could find was 70$ for a d-pad and 8 dinky buttons plus it was not for PC it was for mobile devices like a blackberry. The wiimote puts it to shame and cost less, for me as a cordless guy this was a major breakthrough for gaming on the go.
Edit: Done with my 2nd script! Its a cool winamp script that uses all of the neat features of the wiimote. Here is a video I made to showcase it in action. Just a quicky, no retakes, no editing, no camera man so dont worry about video quality.
<object width='425' height='344'><param name="movie" value="http://www.youtube.com/v/viUYjt5so10&hl=en"></param><embed src="http://www.youtube.com/v/viUYjt5so10&hl=en" type="application/x-shockwave-flash" width='425' height='344'></embed></object>
Edit2: PPJOY does not work with 64bit (atleast not for me) I wanted to do some of that cool FPS game stuff where I need to create a virtual joystick in windows with ppjoy and it wont install on my vista ultimate x64 on my desktop. However it did install in Vista x86 on my laptop. So x64 is not always the best thing and this is yet another big reason why I would stick with x86 for now.
Glovepie does work for both so dont be worried about that.
Edit3: Pinnacle Game Profiler had added the wiimote (and nunchuck/classic controller) to its list of controllers it can use. This program works in x64 OS's so this is probably the future alternative to PPjoy for a x64 based OS. Its buggy right now I suppose but they are still working on it so given good time it should mature into a great program, also it could completely bypass the need for glovepie by letting just bind the wiimote directly to a PC pad with keyboard functions, so this will be good for the novices or those who do not wish to get too advanced as it matures.
-
ViciousXUSMC Master Viking NBR Reviewer
-
Can you set up the IR sensors so you could utilize the pointing/positional interface?
-
ViciousXUSMC Master Viking NBR Reviewer
Yes, thats part of the above. You just need a script that uses it and a sensor bar.
The Wii sensor bar is nothing more than some IR LED's, I am going to build my own on a smaller scale for my laptop out of parts that will use USB for power, it should cost less than 10$ from radio shack. I will have a separate how-to guide after I complete that project.
If your not a DIY kinda guy, you can use your Wii's existing bar just turn the Wii on, or buy one of those 15-20$ wireless bars.
If your really crafty or just want to experiment you can also use 2 candles as a sensor bar ^^
There are several scripts included with the download of glovepie, one of them is called somthing like "IR Mouse" it uses the wii's pointing feature to give you a fully functional mouse with just the wiimote. A good htpc function. -
You know what would be painfully slick? Mod your laptop with IR LEDs over the top of the screen, actually in the frame of the laptop. Probably too much to ask though.
-
ViciousXUSMC Master Viking NBR Reviewer
Already thought about it, but my screen is very thin so not much room and the idea that they have to not stick out at all when I close my lid.
So I will just stick with a mini usb powered laptop sensor bar for now
Im not going to worry about making it pretty, just cheap and functional. -
nice guide
-
Crimson Roses Notebook Evangelist
SWEET! I don't have a Wii, but maybe I'll just get a Wiimote now!
Thanks man +1 -
You know what would be cool (though of arguable utility), use the output from one of the accelerometers to set your volume. Music too soft? Just swing your wiimote. Or, imagine what could be done if you combined the Wiimote with something like Gary's Mod.
-
ViciousXUSMC Master Viking NBR Reviewer
I need to add a "dead zone" to the roll so that it wont activae untill you turn the controller so far. I think I know how to do that now from a analog stick script I saw.
Also something worth mentioning is that you do not have to be an expert to make simple scripts, Glovepie has a built in GUI that lets you pick from a list manually what output funciton you want, and then pick a input function you want and it writes the script for you.
So pick keyboard --> X key as the output, then click wiimote --> b button and hit apply and it will make the script to make the wiimote type X when you press that button. If that was not enough you can also Auto Detect for both out put and input too.
So say you want your analog stick to be your mouse?
Click detect output, move your mouse up. Then click detect input and push your analog stick up. Hit apply and walla your analog stick will move the mouse cursor up and down. Seems to work best with simple scripts, but its also a good way to know what outputs there are and learn some scripting. -
That's pretty cool. Makes me want to get a Wii even more now.
-
ViciousXUSMC Master Viking NBR Reviewer
I have seen some really good implementations: If I had not already uninstalled assassins creed I would have loved this one. Makes you feel more in the game.
The idea of flicking the wiimote to attack, and the wiichuck to do your soft attack, totally genius. Also somebody wrote a good web surf script for a htpc, IR Mouse + Press the home button for a virtual keyboard to pop up so you can type in web sites.
Code:/*ASSASSIN's CREED - PPJOY - SCRIPT BY TERRY HAGERTY Apr 11 - 08 V1.2 To play you need to have PPJOY installed with at least 4 axis's and 20 buttons. The reason I chose to use PPJOY is because the game moves differently with the mouse and keyboard. Also you get Analogue control over Movement! Run this script and launch Assassin's Creed. Choose Options, then customise controls. Select your PPJOY Virtual Joystick as the Controller. Then assign each of the controls the same as below: Move Forward/Back/Left/Right = Nunchuk Analogue Stick Feet (GREEN) = Wiimote A Armed Hand (BLUE) = wiimote.left Open Hand (RED) = wiimote.right Head (YELLOW) = wiimote.up High Profile = Wiimote B Center Camera = Press and Release Nunchuk Z Button Target Lock = wiimote.minus Action Camera = wiimote.plus Map = wiimote.home Esc/pause = Wiimote One With Nunchuk Z Button held down: Pan Camera up = Wiimote.Up Pan Camera down = Wiimote.Down Pan Camera left = Wiimote.Left Pan Camera right = Wiimote.Right Make sure you release the Wiimote Up/Down/Left/Right button before releasing the Z Button, or the Camera will continue to spin. If this happens, just push and release the Z button again. With Nunchuk C Button held down: Hidden Blade = Wiimote.Up Fists = Wiimote.Down Short Blade / Throwing Knives = Wiimote.Left Sword = Wiimote.Right Now you are ready to play! Motion Gestures: Swing Wii Remote in any direction for Armed Hand Attack (BLUE). This is for fighting with your weapons. If you are in a fight, you can hold down the B button and swing the Wii remote in any direction and it will do a counter attack. While in the middle of your counter-attack, let go of B and swing to sometimes do more damage to your opponent. Swing the Nunchuk in any direction for Open Hand (RED). This is for Dropping down, Gentle Push, etc... Hold down the B button and Flick the Nunchuk (Forward,back,left,right) to grab and throw someone. Don't move the Nunchuk Analogue Stick while doing this as the direction you Flick the Nunchuk will determine automatically what direction the person gets thrown. However, if you are in a fight, then the Nunchuk flick will just grab someone and throw them forward. That's it! Have Fun!!! */ //This varible controlls the ammount of force you need to use when moving the //wiimote or nunchuk, make it lower if you want to use less force when moving the //wiimote or nunchuk var.ForceSensitivity=15 //Joystick - Walk/Run //Movement (You must assign your Nunchuk stick for movement in-game under gamepad options) PPJoy.Analog2=wiimote.Nunchuk.JoyX PPJoy.Analog3=wiimote.Nunchuk.JoyY //endif var.grabright= (Wiimote.nunchuk.RawAccx > var.ForceSensitivity, Wiimote.nunchuk.RawAccx < -var.ForceSensitivity) and wiimote.b=true var.grableft = (Wiimote.nunchuk.RawAccx < -var.ForceSensitivity, Wiimote.nunchuk.RawAccx > var.ForceSensitivity) and wiimote.b=true var.grabback =(Wiimote.nunchuk.RawAccy > var.ForceSensitivity, Wiimote.nunchuk.RawAccy < -var.ForceSensitivity) and wiimote.b=true // Attack/Select/Armed Hand - BLUE ppjoy.digital15=(Wiimote.RawAccX > var.ForceSensitivity or Wiimote.RawAccX < -var.ForceSensitivity) or (Wiimote.RawAccy > var.ForceSensitivity or Wiimote.RawAccy < -var.ForceSensitivity) //Drop/Grab/Tackle ppjoy.digital3=(Wiimote.nunchuk.RawAccx > var.ForceSensitivity or Wiimote.nunchuk.RawAccx < -var.ForceSensitivity) or (Wiimote.nunchuk.RawAccy > var.ForceSensitivity or Wiimote.nunchuk.RawAccy < -var.ForceSensitivity) // High Profile ppjoy.digital1=wiimote.b // Feet - GREEN ppjoy.digital2=wiimote.a // Target Lock ppjoy.digital4=wiimote.minus //Action Camera ppjoy.digital6=wiimote.plus //Map ppjoy.digital7=wiimote.home //Esc-Pause ppjoy.digital8=wiimote.one if Wiimote.Nunchuk.cbutton =false and Wiimote.nunchuk.zbutton=false then // Head - YELLOW ppjoy.digital9=wiimote.up //Armed hand - BLUE ppjoy.digital15=wiimote.left or (Wiimote.RawAccX > var.ForceSensitivity or Wiimote.RawAccX < -var.ForceSensitivity) or (Wiimote.RawAccy > var.ForceSensitivity or Wiimote.RawAccy < -var.ForceSensitivity) // High Profile ppjoy.digital1=wiimote.b // Feet - GREEN ppjoy.digital2=wiimote.a //Drop/Grab/Tackle ppjoy.digital3=wiimote.right or(Wiimote.nunchuk.RawAccx > var.ForceSensitivity or Wiimote.nunchuk.RawAccx < -var.ForceSensitivity) or (Wiimote.nunchuk.RawAccy > var.ForceSensitivity or Wiimote.nunchuk.RawAccy < -var.ForceSensitivity) //Grab left if var.grableft=true then ppjoy.digital3=true wait 50 ms PPJoy.Analog2=-1 wait 350ms ppjoy.digital3=false PPJoy.Analog2=false endif //Grab right if var.grabright=true then ppjoy.digital3=true wait 50 ms PPJoy.Analog2=1 wait 350ms ppjoy.digital3=false PPJoy.Analog2=false endif //Grab Back if var.grabback=true then ppjoy.digital3=true wait 50 ms PPJoy.Analog3=1 wait 350ms ppjoy.digital3=false PPJoy.Analog3=false endif endif //Weapons if Wiimote.Nunchuk.cbutton and Wiimote.nunchuk.zbutton=false then ppjoy.digital11 = Wiimote.Up ppjoy.digital12 = Wiimote.Down ppjoy.digital13 = Wiimote.Left ppjoy.digital14 = Wiimote.Right endif // Hold Nunchuk Z Button for full aim and movement // Press and Release Z Button for Center Camera if var.camera and Wiimote.nunchuk.zbutton=true then ppjoy.digital17 = Wiimote.Up ppjoy.digital18 = Wiimote.Down ppjoy.digital19 = Wiimote.Left ppjoy.digital20 = Wiimote.Right //PPJoy.Analog0=wiimote.Nunchuk.JoyX //PPJoy.Analog1=wiimote.Nunchuk.JoyY endif var.old = var.jnew var.new = HeldDown(Wiimote.plus, 250 ms) if var.camera=false then ppjoy.digital5 = Released(Wiimote.nunchuk.zbutton) && !var.jold endif var.camera = HeldDown(Wiimote.nunchuk.zbutton, 300 ms)
-
ViciousXUSMC Master Viking NBR Reviewer
Video Time! I do want to make some of my own videos but for now there are plenty out there to get you fired up and see some of the possible things you can do.
> Using Wiimotes Tilt control for PC Need for speed Porche
> Controlling Windows Media Player & Using both tilt axis for this cool marble balance game.
> Half Life 2 Using tilt for mouse control (not IR) and Accelerometer for jump
> Media Player Classic & some web browsing
> A good mouse use with IR instead of tilt, also using candles for a sensor bar (you guys can hunt him him down and kill him later for putting candles on his laptop)
> Final Fantasy XI
> Another good mouse video w/ IR used. -
Doesn't work in my M1530.
The 4 leds are flashing in my Wiimote, I couldn't select a passkey and when I run glovepie it doesn't work.
(I'm using default BT drivers) -
Looks like you did an excellent job with the guide. I'll be looking into this. Not sure if I'll actually use it though.
-
Lethal Lottery Notebook Betrayer
so pointless , yet so interesting.
-
just a question and i think you already answered it but can you assign comand functions to wiimote buttons?
-
ViciousXUSMC Master Viking NBR Reviewer
-
ViciousXUSMC Master Viking NBR Reviewer
-
I guess my problem is with "Dell Bluetooth 355". (googled about it)
Maybe I should try BlueSoleil to see if it it works, but I don't know if the trial will work. -
ViciousXUSMC Master Viking NBR Reviewer
I wouldn't be surprised if you can find the full versions of the Toshiba stack easy on the web since its part of the software for many laptops, or even a full version of BlueSoleil if you look around enough... -
^ Is patiently waiting to hear if the BT Dongle Vicious bought works with Wiimote.
-
ViciousXUSMC Master Viking NBR Reviewer
3 day UPS snail mail + weekend it wont be here for awhile
The price of the dongle was cheap but S&H was pretty high. No choice tho, the ones you can buy in a store are overpriced and usually not that good.
-
-
ViciousXUSMC Master Viking NBR Reviewer
Yeah you can make a script for that very easy, infact thats as simple as it gets.
It would be like Key.control and key.c = Wiimote1.B
You could use the built in GUI to create it for you. -
awesome man! thanx
-
ViciousXUSMC Master Viking NBR Reviewer
Much welcome, my BT USB adapter was shipped, it will be here target date the 4th it says on the shipping data but it was in transit to Jacksonville only a few hours away on Saturday so maybe I will get it sooner.
Thats a definite maybe tho because I have seen UPS have an item 1 city over before 4 days ahead of time on 7 day mail and the item wont move until the last day, I guess they do this so next time you get the faster more expensive shipping.
I wanna play around more with it to night but its my "Monday" at work and from my 2 days off the people that work my days off couldn't figure out how to do my workload so I have 2 days of paper work sitting here for me before I can even start on todays work.... -
ViciousXUSMC Master Viking NBR Reviewer
Gonna start posting some of the better scripts I find on here to share. I really liked this one it makes most FPS games play sort of like how metroid prime 3 does on the wii (witch I am currently playing)
Code:/* Best FPS controller EXPLINATION: The wiimote controls like a mouse except if it leaves the bounding- box. There is a "bounding box" that when the Wiimote IR points to the left or right it will start to auto-turn. This is analog so the further you go out of the box, the faster you turn. It will also rumble to feedback that you are turning. Otherwise, it just controls like a mouse. I experimented for weeks with this thing and it's the best. To put it simply, it controls like a mouse until you leave the bounds, then it acts like a joystick and mouse put together, giving you the pixel-perfect (well, close) accuracy while still being able to make analog turns. Requires sensor bar Requires PPjoy with X & Y axis )don't need BUTTONS OR POV) your game has to be able to customize the controls including the joystick. The only game that I own that does not work is Hexen II. You could modify the program to accomodat it by swallowing and other techniques. Please be aware that after you start the program, make sure the wiimote is pointing away from the sensor bar until you get in the game. Also, sometime the Nunchuck is not recognized as plugged in, so I added a little feature that when you push the A and B buttons at the same time, the wiimote leds will flash if the nunchuk wasn't recognized. Just unplug the nunchuck and replug it back in until they don't flash anymore. GETTING STARTED: Make sure that you have PPJoy installed and running analog0 and analog1. Then get in to you game simply map the buttons as shown below or if the game recognizes button presses just press the button on the wiimote/nunchuck that you want. Cake. Keep in mind that a hearty swing from the wiimote outputs "W" and nunchuck "N" so they can be mapped. The W is rather inconveinient while trying to aim, so don't make it anything critical (if anything at all). Don't forget to also set your games sensativity in the sensativity settings below. for the bounding box size I use 3 for DooM/Heretic/HeXeN and 5 for Halo PC. Mess with them till your comfortable. Wiimote button mapping: d-pad: up = U down = D left = L right = R a = A b = B minus = M plus = P one = One two = Two swing = W Nunchuck: c = C z = Z swing: N control stick x = PPJoy1.Analog0 control stick y = PPJoy1.Analog1 */ // user settings for sensativity: var.box = 3 //change size of bounding box: 1 - 10. //basically how far you have to go before you start //to auto turn var.boxs1 = 40 //changes sensativity when outside box 10 - 100 //10 (very slow), 100 (very fast) //That should be it! ENJOY! // varible modifiers var.boxs = var.boxs1 * 10 var.box1 = var.box / 10 var.m1 = (var.m * -1) + 11 var.m2 = (1 - (1 / var.m1)) / 2 // leds based on battery life 25/ 50/ 75/ 100% var.batt = (wiimote.Battery / 2 + 4) if var.batt < 25 var.Leds = 1 endif if var.batt < 50 and > 24 var.Leds = 3 endif if var.batt < 75 and > 49 var.Leds = 7 endif if var.batt > 74 var.Leds = 15 endif Wiimote.leds = var.leds //Wiimote IR and bouding box var.dot1x = wiimote.dot1x var.dot1y = wiimote.dot1y var.wpx = ((Wiimote.PointerX) - .5) * 2 var.wpy = ((Wiimote.PointerY) - .5) * 2 if wiimote.PointerVisible but not var.PointerBump then if var.wpx > var.box1 or < -var.box1 var.cnt = var.cnt + 1 if var.cnt < 2 var.joyx = wiimote.PointerX endif var.joyx1 = wiimote.pointerx - var.joyx var.r = 1 //for rumble else var.cnt = 0 var.r = 0 //for rumble var.joyx = 0 var.joyx1 = 0 endif var.joyx2 = var.joyx2 + var.joyx1 mouse.DirectInputX = (((var.dot1x - (var.joyx2 * var.boxs))* -1) + 500)/ 2 mouse.DirectInputY = ((var.dot1y) - 200) endif //rumble when outside of bounding box if var.r = 1 Wiimote.Rumble = TRUE wait 1ms Wiimote.Rumble = FALSE wait 40ms else Wiimote.Rumble = FALSE endif // Wiimote buttons key.A = Wiimote.A key.B = Wiimote.B key.M = Wiimote.Minus key.P = Wiimote.Plus key.L = Wiimote.Left key.U = Wiimote.Up key.R = Wiimote.Right key.D = Wiimote.Down key.One = Wiimote.One key.Two = Wiimote.Two key.Escape = Wiimote.Home // Nunchuck buttons key.C = Wiimote.Nunchuk.CButton key.Z = Wiimote.Nunchuk.ZButton // Nunchuk Analog stick PPJoy1.Analog0 = MapRange(Wiimote.Nunchuk.JoyX, -1,1, -1,1) PPJoy1.Analog1 = MapRange(Wiimote.Nunchuk.JoyY, -1,1, -1,1) // Wiimote swing: if (wiimote.RelAccX > 35 or < -35) or (wiimote.RelAccY > 35 or < -35) or (wiimote.RelAccZ > 35 or < -35) key.W = true else key.W = false var.swing = 0 endif //Nunchuck swing: if (wiimote.Nunchuk.RawAccX > 25 or < -25) or (wiimote.Nunchuk.RawAccY > 25 or < -25) or (wiimote.Nunchuk.RawAcc > 25 or < -25) key.N = true else key.N = false endif //press a & b to see if nunchuk is connected correctly, leds flash if not if wiimote.a && wiimote.b = true if wiimote.HasNunchuk = false wiimote.Leds = 0 endif endif
Code:// Starfox Script (By Keenan AKA Gamexprt1) Left = (-1.2 < wiimote.Nunchuk.JoyX < -0.5) Right = (0.5 < wiimote.Nunchuk.JoyX < 1.2) Up = (-1.2 < wiimote.Nunchuk.JoyY < -0.5) Down = (0.5 < wiimote.Nunchuk.JoyY < 1.2) // Analog Stick -- Movement enter = wiimote.plus // Start -- Pause/Choose x = wiimote.B // A Button -- Fire Lazers c = wiimote.down // B Button -- Go Back/Missle v = Wiimote.Nunchuk.CButton // Down C -- Halt f = Wiimote.Nunchuk.ZButton // Left C -- Turbo s = (wiimote.roll >= 30) // R Button -- Tilt z = (wiimote.roll <= -30) // L Button -- Tilt p = wiimote.up// Up C -- Change Camera // LEDS On while Playing Wiimote.Leds = 1
-
ViciousXUSMC Master Viking NBR Reviewer
Super Mario 64 Script to make it play like Mario Galaxy
Code://////////////////////////////////////////////////////////////////////////////// // -Super Mario 64- // // -Super Mario Galaxy- // // -Controls- // // // // -By Jayz Facez- // // -January 2008- // //////////////////////////////////////////////////////////////////////////////// //Controls //Set These keys in your emulator //A=A //B=B //R=R //Start=S //Analog Stick=Arrow Keys //C-Up=Home //C-Down=End //C-Left=Delete //C-Right=Page down //Special Controls //Shake the Wiimote to attack (B) //Flick the Nunchuk up if moving to do a long jump //Flick the Nunchuk up if standing still to do a high jump (Backflip) //----------------------------------------------------------------------------// //SCRIPT //Debug debug = "X="+Wiimote.RelAccX+' Y='+Wiimote.RelAccY+' Z='+Wiimote.RelAccZ //Nunchuk Movement if 2 > Wiimote1.Nunchuk.JoyX > 0.5 then Right = true wait 60 ms Right = false endif if -2 < Wiimote1.Nunchuk.JoyX < -0.5 then left = true wait 60 ms left = false endif if 2 > Wiimote1.Nunchuk.JoyY > 0.5 then down = true wait 60 ms down = false endif if -2 < Wiimote1.Nunchuk.JoyY < -0.5 then up = true wait 60 ms up = false endif //Super Mario Galaxy Style Attack if (wiimote.RelAccX > 25) or (wiimote.RelAccY > 25) or (wiimote.RelAccZ > 15) then B = true wiimote.Rumble = true wait 60 ms B = false wait 240 ms wiimote.Rumble = false endif //LEDS if (Key.B = 1) or (wiimote1.Nunchuk.RelAccY > 10) wiimote.Led1 = 1 wait 50ms wiimote.Led1 = 0 wiimote.Led2 = 1 wait 50ms wiimote.Led2 = 0 wiimote.Led3 = 1 wait 50ms wiimote.Led3 = 0 wiimote.led4 = 1 wait 50ms wiimote.Led4 = 0 wiimote.Led3 = 1 wait 50ms wiimote.Led3 = 0 wiimote.Led2 = 1 wait 50ms wiimote.led2= 0 end if //Controller Mapping Key.A = Wiimote1.A Key.Z = Wiimote1.Nunchuk.ZButton Key.R = Wiimote1.Nunchuk.CButton Key.End = Wiimote1.Down Key.Delete = Wiimote1.Left Key.PageDown = Wiimote1.Right Key.Home = Wiimote1.Up Key.S = Wiimote1.Plus //Auto Long/High Jump if (wiimote1.Nunchuk.RelAccY > 10) Key.Z = 1 Wiimote.Rumble = 1 wait 120 ms Key.A = 1 wait 100 ms Key.Z = 0 Key.A = 0 wait 100 ms Wiimote.Rumble = 0 end if //END //----------------------------------------------------------------------------//
A really cool Winamp Script: It was written for a multimedia keyboard so it may not work stock but will be very easy to edit to use global hotkeys so I may repost this with global hotkeys mapped to it for compatibility.
Code:/Patchwork WinAmp Script //Spence 2008 [email protected] // // I'll start by saying I really had no idea about writing scripts till i had a go, so there may be some problems for // other people. The only problem i can see is the fact i have linked the fuctions to keys on my multimedia keyboard // (Key.NextTrack etc) so if you don't have those keys, you will have to bind my scripts to your buttons some other way. // // If it works - E-mail me! If it doesn't work - E-mail me! :-D // //Includes my favorite bits of a variety of scripts, including the addition of //a script written by me (My First One Ever!) to control the track Forward/Back action with a flick //to the left or the right. Also, the Tilt/Seek Function. //The settings are pretty straight forward, If i can write it, a noobie can read it. To increase the //force required to change track, then increase the values (Default: 45) below. // Track Changes using a 'Flicking' Technique. (LEFT/RIGHT Flick) Key.NextTrack = (Wiimote1.RelAccX < -45) in m per s per s Key.PrevTrack = (Wiimote1.RelAccX > 45) in m per s per s // *************The Technique Below Requires You To Press & Hold The B button whilst tilting************** // Skip Forward Slow (Tilt the wiimote more than 20 degreees to the right, but not more than 60 degrees to achive a slow // seeking speed) if wiimote.b = true then key.right = (Wiimote1.Roll > 20 but < 60) deg wait 400 ms Key.Right = false endif // Skip Forward Fast (Tilt the wiimote more than 80 degrees to the right to do a super seek....It does skip VERY fast // so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments) if wiimote.b = true then key.right = (Wiimote1.Roll > 80) deg wait 50 ms Key.Right = false endif // Skip Back Fast (Tilt the wiimote more than 80 degrees to the left to do a super seek....It does skip VERY fast // so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments) if wiimote.b = true then key.Left = (Wiimote1.Roll < -80) deg wait 50 ms Key.Left = false endif // Skip Back Slow (Tilt the wiimote more than 20 degreees to the left, but not more than 60 degrees to achive a slow // seeking speed) if wiimote.b = true then key.Left = (Wiimote1.Roll < -20 but > -60) deg wait 400 ms Key.Left = false endif //*********************************************************************************************************************** //Not my code, but creds to the original author....It is my favorite! //delay speed for flashing LEDs. higher = slower var.KITTspeed = 100 ms //LEDs look somewhat like KITT's grill from Knight Rider if 0 = 0 then if var.kitt = 0 then wiimote.Leds = 1 endif if var.kitt = 1 then wiimote.Leds = 3 endif if var.kitt = 2 then wiimote.Leds = 6 endif if var.kitt = 3 then wiimote.Leds = 12 endif if var.kitt = 4 then wiimote.Leds = 8 endif if var.kitt = 5 then wiimote.Leds = 12 endif if var.kitt = 6 then wiimote.Leds = 6 endif if var.kitt = 7 then wiimote.Leds = 3 endif wait var.KITTspeed var.kitt = (var.kitt + 1) % 8 endif //Buttons (Everyone should know about these by now) ;-) Key.Enter = Wiimote1.A Key.PlayPause = Wiimote.Home //Code taken from the Original 'Wiimouse_IR' Script. I have made a slight change to the delay to suit my taste. //Thanks due once again. //D-Pad if wiimote.Up Up = true Wait 90 ms Up = false endif if wiimote.Down Down = true Wait 90 ms Down = false endif if wiimote.Left Left = true Wait 90 ms Left = false endif if wiimote.Right Right = true Wait 90 ms Right = false endif //System Volume From same script as D-Pad Functions if wiimote.plus then volumeup = true wait 60 ms volumeup = false endif if wiimote.minus then volumedown = true wait 60 ms volumedown = false endif
Code://Wiimulation: SNES v2.0 //By: Marceux // What does this Script do? // This script checks for whether or not a // wiimote has an expansion, and what kind of // expansion it is. When you replace or remove an // expansion, it does not interfere with the script // and elliminates the need to load up new scripts. // The script then sets the input for the Wiimote // and its expansion, for use in playing with an // SNES emulator. // To Edit or See Player's Config Press Ctrl+F and Type in: // [PLY1] for Player 1 // [PLY2] for Player 2 // E-mail Me Any Questions or Ideas or Concerns // Script Starts Here // If !var.init var.init=true var.wiidetect=true endif //Wiimotes Rumble to Signify Script is Activated If var.wiidetect=True Wiimote1.Rumble=True Wait 500ms Wiimote1.Rumble=False Wiimote2.Rumble=True Wait 500ms Wiimote2.Rumble=False var.wiidetect=False Endif //==================// // // // - First Player - // // [PLY1] // //==================// //-------------------------------------// // Keyboard Input // SNES Button // //-------------------------------------// // For Customization, Change the Key // // Before the '=' sign. // //-------------------------------------// Q = var.K1UP // Up Button // W = var.K1DO // Down Button // E = var.K1LE // Left Button // R = var.K1RI // Right Button // X = var.K1AB // A Button // Z = var.K1BB // B Button // S = var.K1XB // X Button // A = var.K1YB // Y Button // D = var.K1LB // L Button // C = var.K1RB // R Button // F = var.K1ST // Start Button // V = var.K1SE // Select Button // //-------------------------------------// //Sets the Shift Button// Wiimote1.B = var.p1trigger //Gives the Home Button a Function// Keyboard.ESC = var.HOME1 //~~~~~~~~~~~~~~~~*NOTE*~~~~~~~~~~~~~~~~~// // To customize the button layout for // // the following configurations use the // // 4-digit phrase to find and edit the // // script to suit your needs // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote Only Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //-----------------------------------// // SNES Button || Wiimote Button // //-----------------------------------// // Up || Right [W1UP] // // Down || Left [W1DO] // // Left || Up [W1LE] // // Right || Down [W1RI] // // A || Shift + 2 [W1AB] // // B || Two [W1BB] // // X || Shift + 1 [W1XB] // // Y || One [W1YB] // // L || Shift + A [W1LB] // // R || A [W1RB] // // Start || Plus [W1ST] // // Select || Minus [W1SE] // //-----------------------------------// // **"Shift" Default = Wiimote B** // //-----------------------------------// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote and Nunchuk Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //--------------------------------------------// // SNES Button || Wiimote or Nunchuk Button // //--------------------------------------------// // Up || Joystick Up [N1UP] // // Down || Joystick Down [N1DO] // // Left || Joystick Left [N1LE] // // Right || Joystick Right [N1RI] // // A || A [N1AB] // // B || One [N1BB] // // X || C [N1XB] // // Y || Two [N1YB] // // L || Z [N1LB] // // R || B [N1RB] // // Start || Plus [N1ST] // // Select || Minus [N1SE] // //--------------------------------------------// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Classic Controller Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //--------------------------------------------// // SNES Button || Classic Controller Button // //--------------------------------------------// // Up || Up [C1UP] // // Down || Down [C1DO] // // Left || Left [C1LE] // // Right || Right [C1RI] // // A || A [C1AB] // // B || B [C1BB] // // X || X [C1XB] // // Y || Y [C1YB] // // L || L [C1LB] // // R || R [C1RB] // // Start || Start [C1ST] // // Select || Select [C1SE] // //--------------------------------------------// //Checks if using Wiimote Alone If (Wiimote1.Expansion=0) //~~~~~~~~~~~~~~~~~~// // - Wiimote Only - // //~~~~~~~~~~~~~~~~~~// //Adjusts LEDs for No Expansions Wiimote1.Led1=True Wiimote1.Led2=False Wiimote1.Led3=False Wiimote1.Led4=False // Directional Buttons // If (Wiimote1.Right) // [W1UP] Press(var.K1UP) Else Release(var.K1UP) Endif If (Wiimote1.Left) // [W1DO] Press(var.K1DO) Else Release(var.K1DO) Endif If (Wiimote1.Up) // [W1LE] Press(var.K1LE) Else Release(var.K1LE) Endif If (Wiimote1.Down) // [W1RI] Press(var.K1RI) Else Release(var.K1RI) Endif // Multi-function Buttons // If (var.p1trigger && Wiimote1.Two) //"Shift" Button, [W1AB] Press(var.K1AB) Else Release(var.K1AB) Wait 50ms If Wiimote1.Two && (!var.p1trigger) // [W1BB] Press(var.K1BB) Else Release(var.K1BB) endif Endif If (var.p1trigger && Wiimote1.One) //"Shift" Button, [W1XB] Press(var.K1XB) Else Release(var.K1XB) Wait 50ms If Wiimote1.One && (!Wiimote1.B) // [W1YB] Press(var.K1YB) Else Release(var.K1YB) endif endif If (Wiimote1.B && Wiimote1.A) //"Shift" Button, [W1LB] Press(var.K1LB) Else Release(var.K1LB) Wait 50ms If Wiimote1.A && (!Wiimote1.B) // [W1RB] Press(var.K1RB) Else Release(var.K1RB) endif endif // Start, Select, and Home Buttons // If (Wiimote1.Plus) // [W1ST] Press(var.K1ST) Else Release(var.K1ST) Endif If (Wiimote1.Minus) // [W1SE] Press(var.K1SE) Else Release(var.K1SE) Endif If (Wiimote1.Home) Press(var.HOME1) Else Release(var.HOME1) Endif Elseif (Wiimote1.Expansion=2) //~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote and Nunchuk - // //~~~~~~~~~~~~~~~~~~~~~~~~~// //Adjust LEDs for Nunchuk Wiimote1.Led1=True Wiimote1.Led2=False Wiimote1.Led3=True Wiimote1.Led4=False // Nunchuk Joystick // If (-1.2 < Wiimote1.Nunchuk.JoyY < -0.5) // [N1UP] Press(var.K1UP) Else Release(var.K1UP) Endif If (1.2 > Wiimote1.Nunchuk.JoyY > 0.5) // [N1DO] Press(var.K1DO) Else Release(var.K1DO) Endif If (-1.2 < Wiimote1.Nunchuk.JoyX < -0.5) // [N1LE] Press(var.K1LE) Else Release(var.K1LE) Endif If (1.2 > Wiimote1.Nunchuk.JoyX > 0.5) // [N1RI] Press(var.K1RI) Else Release(var.K1RI) Endif // Standard Buttons // If (Wiimote1.A) // [N1AB] Press(var.K1AB) Else Release(var.K1AB) Endif If (Wiimote1.One) // [N1BB] Press(var.K1BB) Else Release(var.K1BB) Endif If (Wiimote1.Nunchuk.CButton) // [N1XB] Press(var.K1XB) Else Release(var.K1XB) Endif If (Wiimote1.Two) // [N1YB] Press(var.K1YB) Else Release(var.K1YB) Endif If (Wiimote1.Nunchuk.ZButton) // [N1LB] Press(var.K1LB) Else Release(var.K1LB) Endif If (Wiimote1.B) // [N1RB] Press(var.K1RB) Else Release(var.K1RB) Endif // Start, Select, and Home Buttons // If (Wiimote1.Plus) // [N1ST] Press(var.K1ST) Else Release(var.K1ST) Endif If (Wiimote1.Minus) // [N1SE] Press(var.K1SE) Else Release(var.K1SE) Endif If (Wiimote1.Home) Press(var.HOME1) Else Release(var.HOME1) Endif Elseif (Wiimote1.Expansion=3) //~~~~~~~~~~~~~~~~~~~~// // Classic Controller // //~~~~~~~~~~~~~~~~~~~~// //Adjust LEDs for Classic Controller Wiimote1.Led1=True Wiimote1.Led2=False Wiimote1.Led3=False Wiimote1.Led4=True // Standard Buttons // If (Wiimote1.Classic.Up) // [C1UP] Press(var.K1UP) Else Release(var.K1UP) Endif If (Wiimote1.Classic.Down) // [C1DO] Press(var.K1DO) Else Release(var.K1DO) Endif If (Wiimote1.Classic.Left) // [C1LE] Press(var.K1LE) Else Release(var.K1LE) Endif If (Wiimote1.Classic.Right) // [C1RI] Press(var.K1RI) Else Release(var.K1RI) Endif If (Wiimote1.Classic.A) // [C1AB] Press(var.K1AB) Else Release(var.K1AB) Endif If (Wiimote1.Classic.B) // [C1BB] Press(var.K1BB) Else Release(var.K1BB) Endif If (Wiimote1.Classic.X) // [C1XB] Press(var.K1XB) Else Release(var.K1XB) Endif If (Wiimote1.Classic.Y) // [C1YB] Press(var.K1YB) Else Release(var.K1YB) Endif If (Wiimote1.Classic.L) // [C1LB] Press(var.K1LB) Else Release(var.K1LB) Endif If (Wiimote1.Classic.R) // [C1RB] Press(var.K1RB) Else Release(var.K1RB) Endif // Start, Select, and Home Buttons // If (Wiimote1.Classic.Plus) // [C1ST] Press(var.K1ST) Else Release(var.K1ST) Endif If (Wiimote1.Classic.Minus) // [C1SE] Press(var.K1SE) Else Release(var.K1SE) Endif If (Wiimote1.Classic.Home) Press(var.HOME1) Else Release(var.HOME1) Endif Endif //===================// // // // - Second Player - // // [PLY2] // //===================// //-------------------------------------// // Keyboard Input // SNES Button // //-------------------------------------// // For Customization, Change the Key // // Before the '=' sign. // //-------------------------------------// T = var.K2UP // Up Button // Y = var.K2DO // Down Button // U = var.K2LE // Left Button // I = var.K2RI // Right Button // N = var.K2AB // A Button // B = var.K2BB // B Button // H = var.K2XB // X Button // G = var.K2YB // Y Button // J = var.K2LB // L Button // M = var.K2RB // R Button // K = var.K2ST // Start Button // Comma = var.K2SE // Select Button // //-------------------------------------// //Sets the Shift Button// Wiimote2.B = var.p2trigger //Gives the Home Button a Function// Keyboard.ESC = var.HOME2 //~~~~~~~~~~~~~~~~*NOTE*~~~~~~~~~~~~~~~~~// // To customize the button layout for // // the following configurations use the // // 4-digit phrase to find and edit the // // script to suit your needs // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote Only Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //-----------------------------------// // SNES Button || Wiimote Button // //-----------------------------------// // Up || Right [W2UP] // // Down || Left [W2DO] // // Left || Up [W2LE] // // Right || Down [W2RI] // // A || Shift + 2 [W2AB] // // B || Two [W2BB] // // X || Shift + 2 [W2XB] // // Y || One [W2YB] // // L || Shift + A [W2LB] // // R || A [W2RB] // // Start || Plus [W2ST] // // Select || Minus [W2SE] // //-----------------------------------// // **"Shift" Default = Wiimote B** // //-----------------------------------// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote and Nunchuk Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //--------------------------------------------// // SNES Button || Wiimote or Nunchuk Button // //--------------------------------------------// // Up || Joystick Up [N2UP] // // Down || Joystick Down [N2DO] // // Left || Joystick Left [N2LE] // // Right || Joystick Right [N2RI] // // A || A [N2AB] // // B || One [N2BB] // // X || C [N2XB] // // Y || Two [N2YB] // // L || Z [N2LB] // // R || B [N2RB] // // Start || Plus [N2ST] // // Select || Minus [N2SE] // //--------------------------------------------// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // - Classic Controller Button Configuration - // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //--------------------------------------------// // SNES Button || Classic Controller Button // //--------------------------------------------// // Up || Up [C2UP] // // Down || Down [C2DO] // // Left || Left [C2LE] // // Right || Right [C2RI] // // A || A [C2AB] // // B || B [C2BB] // // X || X [C2XB] // // Y || Y [C2YB] // // L || L [C2LB] // // R || R [C2RB] // // Start || Start [C2ST] // // Select || Select [C2SE] // //--------------------------------------------// //Checks if using Wiimote Alone If (Wiimote2.Expansion=0) //~~~~~~~~~~~~~~~~~~// // - Wiimote Only - // //~~~~~~~~~~~~~~~~~~// //Adjusts LEDs for No Expansions Wiimote2.Led1=True Wiimote2.Led2=False Wiimote2.Led3=False Wiimote2.Led4=False // Directional Buttons // If (Wiimote2.Right) // [W2UP] Press(var.K2UP) Else Release(var.K2UP) Endif If (Wiimote2.Left) // [W2DO] Press(var.K2DO) Else Release(var.K2DO) Endif If (Wiimote2.Up) // [W2LE] Press(var.K2LE) Else Release(var.K2LE) Endif If (Wiimote2.Down) // [W2RI] Press(var.K2RI) Else Release(var.K2RI) Endif // Multi-function Buttons // If (var.p2trigger && Wiimote2.Two) //"Shift" Button, [W2AB] Press(var.K2AB) Else Release(var.K2AB) Wait 50ms If Wiimote2.Two && (!var.p2trigger) // [W2BB] Press(var.K2BB) Else Release(var.K2BB) endif Endif If (var.p2trigger && Wiimote2.One) //"Shift" Button, [W2XB] Press(var.K2XB) Else Release(var.K2XB) Wait 50ms If Wiimote2.One && (!Wiimote2.B) // [W2YB] Press(var.K2YB) Else Release(var.K2YB) endif endif If (Wiimote2.B && Wiimote2.A) //"Shift" Button, [W2LB] Press(var.K2LB) Else Release(var.K2LB) Wait 50ms If Wiimote2.A && (!Wiimote2.B) // [W2RB] Press(var.K2RB) Else Release(var.K2RB) endif endif // Start, Select, and Home Buttons // If (Wiimote2.Plus) // [W2ST] Press(var.K2ST) Else Release(var.K2ST) Endif If (Wiimote2.Minus) // [W2SE] Press(var.K2SE) Else Release(var.K2SE) Endif If (Wiimote2.Home) Press(var.HOME2) Else Release(var.HOME2) Endif Elseif (Wiimote2.Expansion=2) //~~~~~~~~~~~~~~~~~~~~~~~~~// // - Wiimote and Nunchuk - // //~~~~~~~~~~~~~~~~~~~~~~~~~// //Adjust LEDs for Nunchuk Wiimote2.Led1=True Wiimote2.Led2=False Wiimote2.Led3=True Wiimote2.Led4=False // Nunchuk Joystick // If (-1.2 < Wiimote2.Nunchuk.JoyY < -0.5) // [N2UP] Press(var.K2UP) Else Release(var.K2UP) Endif If (1.2 > Wiimote2.Nunchuk.JoyY > 0.5) // [N2DO] Press(var.K2DO) Else Release(var.K2DO) Endif If (-1.2 < Wiimote2.Nunchuk.JoyX < -0.5) // [N2LE] Press(var.K2LE) Else Release(var.K2LE) Endif If (1.2 > Wiimote2.Nunchuk.JoyX > 0.5) // [N2RI] Press(var.K2RI) Else Release(var.K2RI) Endif // Standard Buttons // If (Wiimote2.A) // [N2AB] Press(var.K2AB) Else Release(var.K2AB) Endif If (Wiimote2.One) // [N2BB] Press(var.K2BB) Else Release(var.K2BB) Endif If (Wiimote2.Nunchuk.CButton) // [N2XB] Press(var.K2XB) Else Release(var.K2XB) Endif If (Wiimote2.Two) // [N2YB] Press(var.K2YB) Else Release(var.K2YB) Endif If (Wiimote2.Nunchuk.ZButton) // [N2LB] Press(var.K2LB) Else Release(var.K2LB) Endif If (Wiimote2.B) // [N2RB] Press(var.K2RB) Else Release(var.K2RB) Endif // Start, Select, and Home Buttons // If (Wiimote2.Plus) // [N2ST] Press(var.K2ST) Else Release(var.K2ST) Endif If (Wiimote2.Minus) // [N2SE] Press(var.K2SE) Else Release(var.K2SE) Endif If (Wiimote2.Home) Press(var.HOME2) Else Release(var.HOME2) Endif Elseif (Wiimote2.Expansion=3) //~~~~~~~~~~~~~~~~~~~~// // Classic Controller // //~~~~~~~~~~~~~~~~~~~~// //Adjust LEDs for Classic Controller Wiimote2.Led1=True Wiimote2.Led2=False Wiimote2.Led3=False Wiimote2.Led4=True // Standard Buttons // If (Wiimote2.Classic.Up) // [C2UP] Press(var.K2UP) Else Release(var.K2UP) Endif If (Wiimote2.Classic.Down) // [C2DO] Press(var.K2DO) Else Release(var.K2DO) Endif If (Wiimote2.Classic.Left) // [C2LE] Press(var.K2LE) Else Release(var.K2LE) Endif If (Wiimote2.Classic.Right) // [C2RI] Press(var.K2RI) Else Release(var.K2RI) Endif If (Wiimote2.Classic.A) // [C2AB] Press(var.K2AB) Else Release(var.K2AB) Endif If (Wiimote2.Classic.B) // [C2BB] Press(var.K2BB) Else Release(var.K2BB) Endif If (Wiimote2.Classic.X) // [C2XB] Press(var.K2XB) Else Release(var.K2XB) Endif If (Wiimote2.Classic.Y) // [C2YB] Press(var.K2YB) Else Release(var.K2YB) Endif If (Wiimote2.Classic.L) // [C2LB] Press(var.K2LB) Else Release(var.K2LB) Endif If (Wiimote2.Classic.R) // [C2RB] Press(var.K2RB) Else Release(var.K2RB) Endif // Start, Select, and Home Buttons // If (Wiimote2.Classic.Plus) // [C2ST] Press(var.K2ST) Else Release(var.K2ST) Endif If (Wiimote2.Classic.Minus) // [C2SE] Press(var.K2SE) Else Release(var.K2SE) Endif If (Wiimote2.Classic.Home) Press(var.HOME2) Else Release(var.HOME2) Endif Endif //===================================// // Things I'd Like To Add Next Time: // // - More Features for Wiimote Solo // // - Battery Power Check // // - Rumble // // - Profiles (?) // // - More Players // //===================================// // Special Thanks // // Wiili // // Carl Kenner // // that's it, really.... // //=======================//
-
ViciousXUSMC Master Viking NBR Reviewer
Resident Evil 4 PC
http://www.youtube.com/watch?v=eDyDC891pFM
Script used in video:
Code:/*'Resident Evil 4' by Tiger ([email protected]) Thanks to Carl Kenner for 'IR to keys' code. ******************************************************************************* This script is designed to map the controls of the PC version of 'Resident Evil 4' (a.k.a. 'Biohazard 4') to match the controls of the recently announced 'Resident Evil 4: Wii Edition' This script can be run without the use of any mouse mods. ******************************************************************************* To use the pointing/aiming functionality, this script requires two IR sources such as in the Wii Sensor Bar, 3rd party Sensor Bars, or two candles. To use an unmodified Wii Sensor Bar on the PC, simply sync your Remote to your PC, then turn on the Wii. Controls: D-pad = Move camera B button = Ready weapon / Aim C button = Ready knife A button = Action, attack, confirm 'Minus' button = Status screen 'Plus' button = Call Ashley '1' button = Map 'Home' button = Options, skip movies Z button = Run (while moving forward), 180 turn (while moving backward) B button + move Remote = Aim weapon B button + shake Remote = Reload C button + shake Remote = Knife attack */ Left = Wiimote.Left //Camera left Right = Wiimote.Right //Camera right Up = Wiimote.Up //Camera up Down = Wiimote.Down //Camera down LeftShift = Nunchuk.CButton //Ready knife RightShift = Wiimote.B //Ready weapon Enter = Wiimote.A //Action, attack, confirm F = Wiimote.Plus //Call Ashley I = Wiimote.Minus //Status screen M = Wiimote.One //Map Esc = Wiimote.Home //Options, skip movies RightCtrl = Nunchuk.ZButton //Run, 180 turn var.IRCount = 2 //Wiimote knife If Nunchuk.CButton Enter = (Wiimote.RawAccX > 15) or (Wiimote.RawAccX < -15) var.Cam = "Aim" EndIf //Wiimote reload If Wiimote.B RightCtrl = (Wiimote.RawAccX > 15) or (Wiimote.RawAccX < -15) EndIf // Camera/Aim var.Cam = "Move" If Wiimote.B var.Cam = "Aim" ElseIf released(Wiimote.B) W= False A = False S = False D = False Else var.Cam = "Move" EndIf If var.Cam = "Aim" If var.IRCount = 1 If Wiimote.dot1vis var.IRx = (1023-Wiimote.dot1x) var.IRy = Wiimote.dot1y var.IRvis = True Else var.IRvis = False EndIf Else If Wiimote.dot1vis and Wiimote.dot2vis var.IRx = 1023-(Wiimote.dot1x+Wiimote.dot2x)/2 var.IRy = (Wiimote.dot1y+Wiimote.dot2y)/2 var.IRvis = True Else var.IRvis = False EndIf EndIf // Change in pointer position is mapped to "IR Joystick" // You may need a minus sign in front of one of these var.IRJoyX = MapRange(Smooth(Delta(var.IRx),2), -20,20, -1,1) var.IRJoyY = MapRange(Smooth(Delta(var.IRy),2), -20,20, -1,1) // Keep holding "IR Joystick" when aiming with pointer off the screen If var.IRvis var.Above = var.IRy < 80 var.Below = var.IRy > 690 var.ToLeft = var.IRx < 80 var.ToRight = var.IRx > 940 Else If var.Above var.IRJoyY = -1 // offscreen speed ElseIf var.Below var.IRJoyY = 1 // offscreen speed EndIf If var.ToLeft var.IRJoyX = -1 // offscreen speed ElseIf var.ToRight var.IRJoyX = 1 // offscreen speed EndIf EndIf If var.Cam = "Aim" var.jx = var.OtherJoyX + var.IRJoyX + var.LeftOverX var.jjx = var.OtherJoyX + var.IRJoyX + var.jLeftOverX var.jy = var.OtherJoyX + var.IRJoyY + var.LeftOverY var.jjy = var.OtherJoyX + var.IRJoyY + var.jLeftOverY Else var.jx = var.OtherJoyX + var.LeftOverX var.jjx = Var.OtherJoyX + var.jLeftOverX var.jy = Var.OtherJoyX + var.LeftOverY var.jjy = Var.OtherJoyX + var.jLeftOverY EndIf If var.jx > 1 var.LeftOverX = var.jx - 1 var.jLeftOverX = Var.jjx - 1 var.LeftKey = False var.RightKey = True ElseIf var.jx < -1 var.LeftOverX = var.jx + 1 var.jLeftOverX = Var.jjx + 1 var.RightKey = False var.LeftKey = True Else var.LeftOverX = var.jx var.jLeftOverX = 0 var.LeftKey = False var.RightKey = False EndIf If var.jy > 1 var.LeftOverY = var.jy - 1 var.jLeftOverY = Var.jjy - 1 var.UpKey = False var.DownKey = True ElseIf var.jy < -1 var.LeftOverY = var.jy + 1 var.jLeftOverY = Var.jjy + 1 var.DownKey = False var.UpKey = True Else var.LeftOverY = var.jy var.jLeftOverY = 0 var.UpKey = False var.DownKey = False EndIf Key.W = var.UpKey Key.S = var.DownKey Key.A = var.LeftKey Key.D = var.RightKey PPJoy.Analog0 = var.PPJoyX PPJoy.Analog1 = var.PPJoyY var.PPJoyX = EnsureRange(var.jjx, -1, 1) var.PPJoyY = EnsureRange(var.jjy, -1, 1) ElseIf var.Cam = "Move" //Joystick movement If Nunchuk.JoyY > 0.55 S = True Wait 10ms S = False EndIf If Nunchuk.JoyY > 0.35 and < 0.55 S = True Wait 25ms S = False EndIf If Nunchuk.JoyY > 0.15 and < 0.35 S = True Wait 35ms S = False EndIf If Nunchuk.JoyY < -0.55 W = True Wait 10ms W = False EndIf If Nunchuk.JoyY < -0.35 and > -0.55 W = True Wait 25ms W = False EndIf If Nunchuk.JoyY < -0.15 and > -0.35 W = True Wait 35ms W = False EndIf If Nunchuk.JoyX < -0.55 A = True Wait 10ms A = False EndIf If Nunchuk.JoyX < -0.35 and > -0.55 A = True Wait 25ms A = False EndIf If Nunchuk.JoyX < -0.15 and > -0.35 A = True Wait 35ms A = False EndIf If Nunchuk.JoyX > 0.55 D = True Wait 10ms D = False EndIf If Nunchuk.JoyX > 0.35 and < 0.55 D = True Wait 25ms D = False EndIf If Nunchuk.JoyX > 0.15 and < 0.35 D = True Wait 35ms D = False EndIf EndIf var.dummy = Wiimote.RawForceX var.dummy = Wiimote.RawForceZ
-
ViciousXUSMC Master Viking NBR Reviewer
A really cool idea here! with room to expand. Another FPS script but this time instead of using the wiimote + nunchuck to completely replace your keyboard and mouse you still use the mouse with this one, and you use the wiimote in your left hand instead of the keyboard.
Dpad to move, tilt the wiimote to reload, press A to fire and you get rumble thus making it more like being in the game, and you can flick the remote up to jump. Really cool idea here. For a game with alot of buttons to use, considering the nature of the wiimote and how it can tilt/flick/rotate ect you can have alot of key commands at your fingertips much faster and easier than on the keyboard.
Code:// ******************************************************** // FLUFFMANS ULTRA EXCITING FPS SCRIPT!! // NONE SEEN LIKE IT BEFORE, ITS SO FUN!! // FEEL FREE TO REPOST / EDIT THIS BUT KEEP THIS SECTION HERE!! //********************************************************* //SET THE FOLLOWING BUTTONS TO THE FOLLOWING IN YOUR GAME: // LEFTMOUSE = JUMP // RIGHTMOUSE = CROUCH // MIDDLEMOUSE = SECONDARY FIRE // MOUSEWHEELUP/DOWN = CHANGE WEAPON // CONTROL = ACTION/USE // KEYBOARD.Z = FIRE // KEYBOARD.X = SPRINT OR WHATEVER ELSE YOU WANT IN CSS // KEYBOARD.V = FLASHLIGHT // KEYBOARD.K = BUY MENU //movement if wiimote.Up keyboard.w = true Wait 20 ms keyboard.w = false endif if wiimote.Down keyboard.s = true Wait 20 ms keyboard.s = false endif if wiimote.Left keyboard.a = true Wait 20 ms keyboard.a = false endif if wiimote.Right keyboard.d = true Wait 20 ms keyboard.d = false endif //RELOAD if wiimote.Roll < -80 keyboard.r = true Wait 20 ms keyboard.r = false endif //Flick it up to jump... didn't work very well for me so use it if you want. if wiimote.pitch > 45 keyboard.space = true Wait 20 ms keyboard.space = false endif //fireing if wiimote.B and not mouse.MiddleButton wiimote.Rumble = true wiimote.Leds = 15 keyboard.Z = true Wait 20 ms keyboard.z = false wiimote.Leds = 0 wiimote.Rumble = false endif //sprint if wiimote.b and mouse.middlebutton keyboard.x = true wait 200ms keyboard.x = false endif //Normal Keybinds keyboard.Ctrl = Wiimote.A keyboard.v = wiimote.Minus keyboard.k = wiimote.Plus
-
ViciousXUSMC Master Viking NBR Reviewer
Also I made this really kick but winamp script last night but I want to finalize it before I post it. -
ViciousXUSMC Master Viking NBR Reviewer
I finished my Winamp Script, this is my first REAL script as it took some actual coding.
Good for fun or HTPC, also if your using wireless headphones it has a use (or me I use it at work so I can quickly change volume or pause music when the phone rings)
Pretty much all the controls are listed in the code but the highlights are rolling the wiimote left/right to fast forward/rewind and having it set for 2 different levels is really cool and something you cant even do without this script.
Tilting the wiimote up/down and it vibrates and then raises/lowers the volume is cool.
Flick to change tracks, fun idea it works well but I have trouble getting it go to back a track, so thats why I added track control into the dpad also.
Code://Really Cool Winamp Script for global keys //Created by ViciousXUSMC some original script from Spence 2008 //The settings are pretty straight forward, // Track Changes using a 'Flicking' Technique. (LEFT/RIGHT Flick) make value higher for a harder flick or less for a soft one. Key.Ctrl + Key.Alt + Key.PageUp = (Wiimote1.RelAccX < -40) in m per s per s Key.Ctrl + Key.Alt + Key.PageDown = (Wiimote1.RelAccX > 40) in m per s per s // *************The Technique Below Requires You To Press & Hold The B button whilst tilting************** // Skip Forward Slow (Tilt the wiimote more than 20 degreees to the right, but not more than 60 degrees to achive a slow // seeking speed) if wiimote.b = true then Key.Ctrl + Key.Alt + Key.Right = (Wiimote1.Roll > 20 but < 60) deg wait 400 ms key.ctrl + key.alt + Key.Right = false endif // Skip Forward Fast (Tilt the wiimote more than 80 degrees to the right to do a super seek....It does skip VERY fast // so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments) if wiimote.b = true then Key.Ctrl + Key.Alt + key.right = (Wiimote1.Roll > 80) deg wait 50 ms key.ctrl + key.alt + Key.Right = false endif // Tilt wiimote up or down while holding B to change volume you will feel vibration while changing volume. if wiimote.b = true and wiimote1.pitch < -25 then volumedown = true wiimote1.Rumble = true wait 40 ms volumedown = false wiimote1.rumble = false endif if wiimote1.pitch > 30 and wiimote.b = true then wiimote1.rumble = true volumeup = true wait 40 ms wiimote1.rumble = false volumeup = false endif // Skip Back Fast (Tilt the wiimote more than 80 degrees to the left to do a super seek....It does skip VERY fast // so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments) if wiimote.b = true then Key.Ctrl + Key.Alt + key.Left = (Wiimote1.Roll < -80) deg wait 50 ms key.ctrl + key.alt + Key.Left = false endif // Skip Back Slow (Tilt the wiimote more than 20 degreees to the left, but not more than 60 degrees to achive a slow // seeking speed) if wiimote.b = true then Key.Ctrl+ Key.Alt+ Key.Left = (Wiimote1.Roll < -20 but > -60) deg wait 400 ms key.ctrl + key.alt + Key.Left = false endif // Toggle Visual Effects: Press A to turn on and off // this is not a default global key and must be added manaually ctrl + alt + v if Wiimote.A = true then Key.Ctrl + Key.Alt + Key.V = true wait 400 ms Key.Ctrl+ Key.Alt+ Key.V= false endif //*********************************************************************************************************************** //Not my code, but creds to the original authorr //delay speed for flashing LEDs. higher = slower var.KITTspeed = 100 ms //LEDs look somewhat like KITT's grill from Knight Rider if 0 = 0 then if var.kitt = 0 then wiimote.Leds = 1 endif if var.kitt = 1 then wiimote.Leds = 3 endif if var.kitt = 2 then wiimote.Leds = 6 endif if var.kitt = 3 then wiimote.Leds = 12 endif if var.kitt = 4 then wiimote.Leds = 8 endif if var.kitt = 5 then wiimote.Leds = 12 endif if var.kitt = 6 then wiimote.Leds = 6 endif if var.kitt = 7 then wiimote.Leds = 3 endif wait var.KITTspeed var.kitt = (var.kitt + 1) % 8 endif //Play/Pause use the home button on the wiimote Key.PlayPause = Wiimote.Home endif //Code taken from the Original 'Wiimouse_IR' Script. I have made a slight change to the delay to suit my taste. //Thanks due once again. //D-Pad if wiimote.Up Up = true Wait 90 ms Up = false endif if wiimote.Down Down = true Wait 90 ms Down = false endif if wiimote.Left key.ctrl + key.alt + key.pageup = true Wait 90 ms key.ctrl + key.alt + key.PageUp = false endif if wiimote.Right key.ctrl + key.alt + key.pagedown = true Wait 90 ms key.ctrl + key.alt + key.pagedown = false endif //Wianamp Volume From same script as D-Pad Functions if wiimote.plus then key.ctrl + key.alt+ key.Up = true wait 60 ms key.ctrl + key.alt+ key.Up = false endif if wiimote.minus then key.ctrl + key.alt+ key.down = true wait 60 ms key.ctrl + key.alt+ key.down = false endif
-
Hey, great script!
I just bought a wiimote today just to try things out hehe. So I don't have an IR sensor bar or anything, but I was able to connect the wiimote successfully with bluesoleil. I tried your winamp script and the only command that worked for me was the volume when I hold B and point up/down. Is the IR bar required for the other commands? I couldn't get it to fast forward or skip tracks. Thanks for any help.
Also, is there a way to turn off the flashing on the wiimote? It's kinda bothersome, and I don't want it to waste power by doing that. Thanks! -
ViciousXUSMC Master Viking NBR Reviewer
No IR is not required for my script, my guess you did not enable global hotkeys in winamp. Its under the prefrences and all of them should be default except I added alt + control + v toggle on and off visualizations.
Also I do plan to build my own IR bar for my laptop but I just picked one the wireless Nyko sensor bar for 15$ at wallmart tonight and it works "ok" but its too big for my laptop but will be good for my PC at home if i do not want to turn on my Wii to use the corded bar.
I made a pretty crappy video of this winamp script for you and others too see, no retakes, not much editing just chopped the beginning and end off and its uploading to youtube now, but im on wifi at work so it may be awhile.
for the flashing led's just delete that whole part of the script with the leds near the bottom. -
About the PPJoy, the thing that's confusing me is the number of times you have to input the controls for the wiimote. Can you run through that? So you configure the wiimote once on PPJoy. Set it to 2 axis, 11 buttons, and 2 POV hats. I tried to scan my buttons but that didn't work. After you're done with that, are you then supposed to use glovepie and configure those controls again? And finally, if you're using an emulator, you will then have to configure controls one more time. If that sounds wrong in any way, please correct me. Thanks. +1 rep -
ViciousXUSMC Master Viking NBR Reviewer
I have not made any PPjoy script really so I am still learning too. I got PPJoy on my laptop fine but dont have any games to really use it on (well n64 emulator) but I wanted to try out some of those great FPS scripts on my PC at home now that I have a sensor bar & a bluetooth adapter but I cant even get PPjoy to install on my PC, my guess is that its not 64bit Vista compatible.
You understand ppjoy tho, it will let you emulate a windows gamepad, so you can use the wiimote as a windows controller.
I suggest looking at some of the scripts I posted on the other pages earlier in the thread and see how they tied ppjoy into glovepie and also maybe look for help on the wiili.org forums/wiki.
edit: video is up!
<object width='425' height='344'><param name="movie" value="http://www.youtube.com/v/viUYjt5so10&hl=en"></param><embed src="http://www.youtube.com/v/viUYjt5so10&hl=en" type="application/x-shockwave-flash" width='425' height='344'></embed></object>Last edited by a moderator: May 6, 2015 -
+1! This was great, I'm def. going to use this. thanks Vicious!
-
ViciousXUSMC Master Viking NBR Reviewer
Glad I could help, im kinda sad that PPjoy wont work in Vista x64
and I really do not feel like booting into XP on my desktop and installing my games on there because I use Vista exclusively now.
-
Personally, I think it's easier to just use Glovepie for scripting without PPJoy, so you're not at a loss. I took a look at the FPS script you posted and it's great! I reprogrammed it so that it suited me. I use the accelerometer to reload instead of rolling. In the heat of battle, it's more exciting that way hehe.
I had a comment on your winamp script. Everything works fine except the flicking of the wiimote. Whenever I flick left or right, it will always change the track forward. You might want to test that out. Instead, I change the track forward with x-axis, and change to the previous track with the y-axis. -
ViciousXUSMC Master Viking NBR Reviewer
Yeah I have difficulty going back a track to and thats why I added that abiility to the dpad. Due to the nature of the flick accelerometer its easy to go forward and not back and I found if you lower the value too much then you end up going forward then back in the same swing. So I figured I may as well just change both motions to foward a track, or if there is a global hotkey you can make make it a random track selection.
As for reload yeah that would be cool, he said in his script that jump was not working well, thats because he used pitched he should have used the accelerometer for that and it would have worked better.
As for PPjoy, I would love to not have to use it but there are several applications and games where you have to have it, mostly for analog input on joysticks. Think N64 emulator, racing games ect. Its the racing games I want to play with right now because I have a wii wheel.
I heard rumors than there may be a 64bit compatible ppjoy but I have no idea how old the post was I saw about that, also pinical game profiler or what ever its called is possibly an alternative down the road, somebody said it works but its extremely unstable crashing after like 4 min at the most when used with the wiimote and glovepie. If they can fix the crashes we would be good to go.
Back to the FPS script I would work on that on a per game basis like if you had a game where you can "peek" around corners and crouch. I would have roll functions to lean around the corners, and a small down pitch for crouching. It would be very natural to just move the controller to perform those actions. -
Here's my script to Half-Life 2, since I am playing it right now. I edited Fluffman's great script and now it works really well for my needs. Makes the game feel a lot different and more exciting.
One thing I really liked about the earlier script was the sprinting. You hold the middle button on your mouse and also hold the B button on the wiimote to sprint forward. With my script, if you let go of the middle button, you will run and jump at the same time. It's one of those techniques that's easy for the keyboard but will take some practice with the wiimote.
I really enjoy this script, because you can be doing so many commands at once. Crouching while reloading your gun, and killing baddies with your mouse makes the game so much more entertaining with the wiimote. One thing to note for this script is that you should do quick switching, so when you press button one on the Wiimote, the grenade is automatically equipped.
It's my first script, so please comment on how I can improve. I tried to do the most minimal amount of coding possible.
Code://Half-Life2 FPS Script Used For Default Controls //Credits to Fluffman's initial post with this script //Indicator Wiimote.LED1 = True //Movement W = Wiimote.Up S = Wiimote.Down A = Wiimote.Left D = Wiimote.Right //Reload, flick right If(Wiimote.RelAccX > 30) in m per s per s Wiimote.Rumble = True R = True Wait 100 ms Wiimote.Rumble = False R = False EndIf //Zoom, Point Up If Wiimote.Pitch > 45 Z = True Wait 10 ms Z = False EndIf //Jump, B If Wiimote.B and not Mouse.MiddleButton Space = True Wait 10 ms Space = False EndIf //Sprint Hold Middle Click and B If Wiimote.B and Mouse.MiddleButton Shift = True Wait 10 ms Shift = False EndIf //Crouch, Point Down If Wiimote.Pitch < -30 Ctrl = True Wait 10 ms Ctrl = False EndIf //Flashlight F = Wiimote.Minus //Gravity Gun G = Wiimote.Plus //Use/Action E = Wiimote.A //Menu Escape = Wiimote.Home //Grenade Five = Wiimote.One //Rally Group C = Wiimote.Two
-
ViciousXUSMC Master Viking NBR Reviewer
Update!
I may have found a new avenue to attack the x64 OS issue with PPjoy.
Pinnacle game profiler has added support for the wiimote + nunchuck & classic controller to there list of support gamepads.
Its out of beta but far from finalized. they have everything supported right now except the IR function.
I tried to use it tonight to test it out and I cant get it to detect my wiimote on my laptop. So I will try later on my desktop and see how it goes.
Some people on the wiili.org forums have used pinnacle with glovepie but it crashes within a few minutes. However due to the nature of Pinnacle unless you need to do advanced coding you can do any basic gamepad stuff directly by just using the program to map keyboard functions to the remote.
I hope that Pinnacle doesnt get greedy and try to make the program work on its own only and sees that many people want to use it with glovepie and make it compatible. Also the next version is supposed to fix many incompatability issues, make it run faster and add IR support.
So keep an eye on this as it may be the next big thing for the wiimote on PC. -
ViciousXUSMC Master Viking NBR Reviewer
@ApocNarok
That script looks great, its amazing how many different ways glovepie will read script and have it work.
yours is the first that I noticed you can just put V = Wiimote.A and not Key.V = Wiimote.A
Its also the first time I have seen a if statement without the = true
I know that if you do not put = false or = true that it will default to a = true function on its own but I just never did it that way so the code is easier to understand how it works.
I like the idea that you use a "if this key is used but not this key" kind of function. Glovepie is just simply amazing the level of detail and programmability it has.
No other program lets you have this level of control over controls on a controller even stuff that was considered "advanced" like the XBCD drivers vs the stock MS drivers for the xbox 360 controller.
Also on that note I think glovepie works for the 360 controller too so I may have found a good work around for the XBCD drivers not working for me recently and the fact that they are now old and no longer supported. -
Yeah, GlovePie is a great program. It's amazing how it works. Very simple, and yet very versatile. The Key.A function was what I thought you had to write too in order for it to register. I guess depending on what you do, more complex programming will require more boundaries. PS3 controllers work too I believe. It's also bluetooth, but I find that the Wiimote will be the most enjoyable one.
I tried using the wiimote as a mouse today using the accelerometer. It's really fun, but hard to navigate. I also have the IR script but I don't have a sensor bar. Do you by chance know of a cheap, yet durable sensor bar that I could use for my laptop? I would like for it to be located on my keyboard drawer if possible. What would you recommend? I don't own a wii so I'm out of luck. I'm shooting for less than 15$ but higher if it's highly recommended. Thanks for any info. -
ViciousXUSMC Master Viking NBR Reviewer
Well you can test the IR script just with 2 candles for now, it works!
However I got the Nyko wireless sensor bar the other day for 15$ at wallmart. Thats the cheapest its gonna get but its kinda big and so not great for portability or laptop use.
The best solution is DIY, I plan to make one out of parts from radio shack and have it run off 5v via USB, I would imagine it would cost less than 10$ to make, but it wont be pretty.
As for a very small solution thats already built, but not cheap there is this:
http://www.9voltlight.com/inc/sdetail/82
Also you can MOD the stock wii sensor bar to run off a 9v battery by shorting out 2 of the LED's it brings it down from 12v to around 9v.
Lastly my idea for a good permanent desktop solution would be to get one of those adapters that let you run car accessories from a wall outlet. Thats 12v and thats what the stock wii sensor uses and you can order replacement bars from nintendo for 10$. So just wire the sensor bar to that adapter and you have a perfect sensor for probably 20$ total.
Im still hammering away with pinnacle, I got it to recognize the wiimote finally by downloading v4.0 beta instead of the direct download of there new v4.4.
but I still do not have the controller actually doing anything even after I assign the buttons functions. -
ViciousXUSMC Master Viking NBR Reviewer
You inspired me to write a FPS script. This is just the start but it has so much potential. I figured out that even tho in the forums it says "+" and "and" are interchangable they are not. When I went to use simple script like
key"a" actiavte when key"b" + key"c" are both pressed together it did not work.
So just for the heck of it I put "and" instead of "+" and it works perfectly!
I use this combo button setup with the A key on the wiimote since its easy to reach and will let you double the functions you have at your disposal.
I knew I could right it as a if statement.
Like this
If key.b + key.c = true
then key.a = true
endif
If key.b + key.c = false
then key.a = false
endif
But the simple way I did it makes the script much shorter and easier to follow. I learn more and more every time I do this.
So this is just the start of my battlefield 2142 script, I have yet to try it in-game so it may need some tweaking (like prone for instance if I remember is not held down but rather toggled so I need to change how prone works by adding a delay to the key press probably)
I like the idea of using the B button to fire since its like a trigger and I can make it rumble when you press it just like firing a gun but I am purposely making this script so that you change none of the normal controls and can change between keyboard and controller at anytime with no ill effects. So thats why I tied the rumble into the mouse click instead to see how that works.
Well here is the code so far.
Code:// ViciousXUSMC's Battlefield 2142 FPS Script // Play game like normal with mouse, but keyboard functions are replaced // with the wiimote in the left (or right) hand to enhance gameplay. // Wiimote Rumble When You Shoot (or click anything lol) if mouse.LeftButton = true then wiimote1.rumble = true endif if mouse.LeftButton = false then wiimote1.rumble = false endif // Movement key.w = wiimote1.up key.s = wiimote1.down key.a = wiimote1.left key.d = wiimote1.right // Jump/Parachute by flicking the wiimote up to you key.space = wiimote1.relaccy > 28 but not wiimote1.a // Reload by holding the A button and flicking the wiimote up to you key.r = wiimote1.relaccy > 28 and wiimote1.a // Crouch by pointing the wiimote down key.leftcontrol = wiimote1.pitch < -22 but not wiimote1.a // Prone by pinting the wiimote down then pressing A key.z = wiimote1.pitch < -22 and wiimote1.a // Enter/Exit a Vehicle by rolling the wiimote to the right key.e = wiimote1.roll > 25 // Pick up a kit off fallen soldure by rolling wiimote to the left key.g= wiimote1.roll < -25 // Radio Commands - button & + button key.q = wiimote1.minus key.t = wiimote1.plus // Spawn/Kit Selection Screen press Home button key.enter = wiimote1.home
-
ViciousXUSMC Master Viking NBR Reviewer
BF2142 Script Updated!
Its nearly complete. I am downloading the game now to test it out and tweak it as needed. I would like others to try it also.
I have yet to use the B button on the back, or the 1 & 2 buttons so I would like feedback on what to use them for.
I am thinking of making the B button the shoot button even tho you already can shoot from the mouse, but make it vibrate the controller and remove vibrate from when the mouse is used. That way it feels more natural and you feel like your shooting a weapon.
The 1 & 2 buttons can be used for speech or map or something. I may be able to pick what feels best and most needed when the game is done, but im on wifi right now so its gonna take all night and probably longer. -
Glad to hear you're having fun with FPS scripts. I'll try yours out, and maybe I could get some more ideas from you. I don't have BF2142, but I will see how it feels in other games.
-
ViciousXUSMC Master Viking NBR Reviewer
Well alot of the keys are BF2142 specific so it wont play well with another game
but you can see how it works and substitue keys I suppose.
Also I think maybe the roll angle needs to be boosted to 30 from 25. I was noticing that maybe 25 is too easy to trigger on accident.
This script would be great to freak somebody out lol, controlling your controller and making it vibrate with a mouse click from across the room. -
This is quite possibly the best thing i have seen in a long time...
Great Guide!
Guide: Use your Wii Controller on your Computer!
Discussion in 'Accessories' started by ViciousXUSMC, May 30, 2008.