 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
sesam
Joined: 06 Aug 2008 Posts: 1
Digg It |
Posted: Wed Aug 06, 2008 3:40 pm Post subject: WiiAlarm 0.2 |
|
|
Based on 0.1 by St0mPy (Jan 10, 2008), here comes a suggested 0.2 of the "sibling alarm":
| Code: | //WiiAlarm 0.2
//Wii rumbles when mouse moves. Use as alarm when leaving computer with siblings nearby.
if not ((Mouse.x == var.mx) and (Mouse.y==var.my)) then
if var.count>1 then
Wiimote.Rumble = true
else
wait 1000ms
var.count++
endif
wait 20 ms
Wiimote.Rumble = false
var.mx=Mouse.x
var.my=Mouse.y
endif
|
|
|
| Back to top |
|
 |
danspy
Joined: 11 Aug 2008 Posts: 1 Location: UK
Digg It |
Posted: Mon Aug 11, 2008 2:34 pm Post subject: iiTunesmote |
|
|
This is a basic script by me, for iTunes in case you don't like WMP
| Code: |
//iiTunesmote
//Created By danspy
// iTunes must be open and at the front
// I am a n00b and this is my first script
//Controls:
// Plus - Next Song
// Minus - Previous Song
// A - Play/Pause
// 1 - Mini Mode
// 2 - Eject Disc
// Down - Turn volume down
// Up - Turn volume up
// Home - Visualisation
// Left (Only in vizualizer) - Previous Visualisation
// Right (Only in vizualizer) - Next Visualisation
Control && Right = Wiimote.Plus
Control && Left = Wiimote.Minus
Space = Wiimote.A
Control && down = Wiimote.Down
Control && up = Wiimote.Up
Control && M = Wiimote.1
Control && T = Wiimote.Home
S = Wiimote.Right
A = Wiimote.Left
Control && E = Wiimote.2 |
|
|
| Back to top |
|
 |
Maxadam5

Joined: 23 May 2008 Posts: 39
Digg It |
Posted: Fri Aug 15, 2008 1:32 am Post subject: Re: Idea |
|
|
| Maxadam5 wrote: | Ok i have an idea but I cannot but I cant do it alone, here I go:
What if there was an fps script unlike any other living breathing fps script. One far better, a glovepie script that would make the creator and all associates famous, (ok now do i have your attention?)
Lets make an FPS script that uses a bounding box but not a normal fps bounding box. One that almost uses the same system as metroid prime: corruption, so the screen keeps rotating until the pointer goes back into the area that isn't the bounding box. Almost like a Metroid prime and ultimate fps script hybrid. I ask you, the most experienced glovepie script writers who view this post, to help me change my (almost a) dream, into an awesome, reality. I don't want any credit i just want the script. |
I found one like it here it is enjoy
| Code: | //Setup the input (so you can use any analog input with this code
var.InputX = Wiimote1.Dot1X // X component
var.InputXRangeStart = 0 Pixels // Smallest X value possible
var.InputXRangeEnd= 1023 Pixels //Biggest X value possible
var.InputXRangeSiz= (var.InputXRangeEnd- var.InputXRangeStart ) //calculates the size of the avaiable range
var.InputY = Wiimote1.Dot1Y // Y component
var.InputYRangeStart = 0 Pixels // Smallest Y value possible
var.InputYRangeEnd = 767 Pixels //Biggest Y value possible
var.InputYRangeSiz= (var.InputYRangeEnd- var.InputYRangeStart ) //calculates the size of the avaiable range
var.InputEnabled= Wiimote1.Dot1Vis //checks to see if the data is avaiable
// how much of the Y axis us destuned to "Absolute" motion,
// more than this in either direction will go into "Relative" mode
var.RangeX=(var.InputXRangeSiz / 4)
// how much of the Y axis us destuned to "Absolute" motion,
// more than this in either direction will go into "Relative" mode
var.RangeY= (var.InputYRangeSiz / 4)
var.eyesizeX= 300 Mickeys //the size of the "Absolute" X movement in DirectInput units
var.eyesizeY= 225 Mickeys //the size of the "Absolute" y movement in DirectInput units
var.edgespeedX= 30mickeys //Speed of the X axis when in "relative" mode
var.edgespeedY= 20Mickeys //Speed of the Y axis when in "relative" mode
if (var.InputEnabled)then //if the data is avaiable process it
// X offset in relation to the relative position
var.Xloc= -MapRange(var.InputX, var.InputXRangeStart , var.InputXRangeEnd, -var.eyesizeX,var.eyesizeX)mickeys
// Y offset in relation to the relative position
var.Yloc= MapRange(var.InputY, var.InputYRangeStart , var.InputYRangeEnd, -var.eyesizeY,var.eyesizeY)mickeys
//not used anymore, returns the distance from the relative position, I choose to use the distance per axis instead
var.dist =sqrt(sqr((var.InputXRangeSiz/2) - var.InputX)+ sqr((var.InputYRangeSiz/2)- var.InputY))
var.text= ""
//if X is bigger than the Absolute range then process it as relative
if ( sqrt(sqr((var.InputXRangeSiz /2) - var.InputX)) > var.RangeX) then
// change the relative position based on the direction the cursor is
var.MiddleX = var.MiddleX+ (Maprange(var.Xloc, -Var.EyeSizex,var.eyesizex, -var.edgespeedX,var.EdgeSpeedX))
var.text =var.text+"edging X " //adds to the debug thing what it is doing
endif
//if Y is bigger than the Absolute range then process it as relative
if ( sqrt(sqr((var.InputYRangeSiz /2) - var.InputY)) > var.RangeY) then
// change the relative position based on the direction the cursor is
var.MiddleY = var.MiddleY+ (Maprange(var.Yloc, -Var.EyeSizeY,var.eyesizeY, -var.edgespeedY,var.EdgeSpeedY))
var.text= var.text+ "edging Y " //adds to the debug thing what it is doing
endif
//if inside the absolute rnage then do whatever it is required
if ((sqrt(sqr(((var.InputYRangeSiz)/2) - var.InputY)) <= var.RangeY)) OR ( sqrt(sqr((var.InputXRangeSiz/2) - var.InputX)) <= var.RangeX)then
var.Text=var.Text+"local "// not much to be done, only ads to the debug thing what it is doing
endif
debug = var.text+ Mouse.DirectInputPos
//Position the DirectInput cursor based on what it has processed
Mouse.DirectInputPos = [var.MiddleX + var.Xloc, var.MiddleY + var.Yloc]
endif
// Nunchuk Analog stick
if Wiimote.nunchuk.joyy > .2
Keyboard.S = 1
else if Wiimote.nunchuk.joyy < -.2
Keyboard.W = 1
else
Keyboard.S = 0
Keyboard.W = 0
endif
if wiimote.nunchuk.joyx > .2
Keyboard.D = 1
else if wiimote.nunchuk.joyx < -.2
Keyboard.A = 1
else
Keyboard.D = 0
Keyboard.A = 0
endif
//part one of the workaround GlovePIE's bug
//also a shortcut for wiimotes swing and xyz
var.A = Wiimote1.A
var.B = Wiimote1.B
var.home = Wiimote1.Home
var.plus = Wiimote1.Plus
var.minus = Wiimote1.Minus
var.Cbutton = wiimote.Nunchuk.CButton
var.Zbutton = wiimote.Nunchuk.ZButton
var.one = wiimote.One
var.two = wiimote.Two
var.up = wiimote.Up
var.down = wiimote.Down
var.left = wiimote.Left
var.right = wiimote.right
var.nunchukswing = (wiimote.Nunchuk.RawAccX > 25 or < -25) or (wiimote.Nunchuk.RawAccY > 25 or < -25) or (wiimote.Nunchuk.RawAcc > 25 or < -25)
var.nunchukx = (wiimote.Nunchuk.RawAccX > 25 or < -25)
var.nunchuky = (wiimote.Nunchuk.RawAccY > 25 or < -25)
var.nunchukz = (wiimote.Nunchuk.RawAccZ > 25 or < -25)
var.wiimoteswing = (wiimote.RawAccX > 25 or < -25) or (wiimote.RawAccY > 25 or < -25) or (wiimote.RawAcc > 25 or < -25)
var.wiimoteX = (wiimote.RawAccX > 25 or < -25)
var.wiimoteY = (wiimote.RawAccY > 25 or < -25)
var.wiimoteZ = (wiimote.RawAccZ > 25 or < -25)
/////////////////////////////////////
key.A = var.a
key.B = var.b
key.Up = var.up
key.Down = var.down
key.Left = var.left
key.Right = var.right
key.Minus = var.minus
key.P = var.plus
key.H = var.home
key.One = var.one
key.Two = var.two
key.C = var.cbutton
key.Z = var.zbutton
|
|
|
| Back to top |
|
 |
masterameel
Joined: 01 Sep 2008 Posts: 2
Digg It |
Posted: Mon Sep 01, 2008 12:59 pm Post subject: |
|
|
Hi. I was trying to code something so that when hit 1/2 buttons, program for wiimote would change.
For instance, you want to play winamp with wiimote, then u want to play some fps, or afterwards get some good vibes.
You want to do all taht without loading a new script.
I basically copied codes from this thread, so credit goes to the original coders.
Basically I put them together, but i found some hard limits on programming in GlovePie.
First, it seems that wiimote keeps looping signals, or at least there's no proper way to stop GlovePie from processing the codes over and over again. It kinda screw up easy work and turn it into a nightmare.
Also, I can't really writeup a global variable that is changeable. The variables can only be changed, for instance while a button is pressed (have to keep holding the button). Otherwise, the variable goes back to default value it has..
Anyway, even though disappointed, I wrote some code for what i intended with some ways of getting around the problems above - not good ways, very bad actually, but it works for my purposes.
Here's the code.
Can ANYONE please tell me THAT I AM WRONG and there is a simpler way of doing the stuff below that is not dodgy:
| Quote: |
// Type your program here, or click the GUI tab to autogenerate it!
if wiimote.1 then
if wiimote.led1= 0 && wiimote.led2= 0
wiimote.Rumble =1
wait 400ms
wiimote.rumble= 0
wiimote.led1=1
elseif wiimote.led1= 1 && wiimote.led2= 0
wiimote.Rumble =1
wait 400ms
wiimote.rumble= 0
wiimote.led2=1
wiimote.led1=0
endif
endif
if wiimote.2 then
if wiimote.led1= 0 && wiimote.led2= 1
wiimote.Rumble =1
wait 400ms
wiimote.rumble= 0
wiimote.led2=0
wiimote.led1=1
elseif wiimote.led1= 1 && wiimote.led2= 0
wiimote.Rumble =1
wait 400ms
wiimote.rumble= 0
wiimote.led1=0
endif
endif
// Type your program here, or click the GUI tab to autogenerate it!
if wiimote.led1= 0 && wiimote.led2= 0
ctrl+alt+pagedown = wiimote.right
ctrl+alt+pageup = wiimote.left
ctrl+alt+up = wiimote.Plus
ctrl+alt+down = wiimote.minus
ctrl+alt+home = wiimote.A
ctrl+alt+insert = wiimote.B
ctrl+alt+right = wiimote.Up
ctrl+alt+left = wiimote.down
endif
if wiimote.led1= 1 && wiimote.led2= 0
/* NOTE for this code to work right with the wiimote please
read the following */
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6
var.xOffset = 2.25
var.yOffset = -1.5
var.zOffset = 4.5
// Change this if you would like your mouse to go faster
var.speed = 1
// change these to a higher number if your hands are not steady or lower if they are
var.xCutoff = 7
var.zCutoff = 7
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
debug = 'X:' + var.xRot + ', ' + 'Y:' + var.yRot + ', ' + 'Z:' + var.zRot
// This is the code that moves your mouse
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot + var.zCutoff)
// B for left click and A for right click
mouse.LeftButton = Wiimote.A
mouse.RightButton = Wiimote.B
// Plus and Minus on the wiimote to use the scroll wheel
// get for scrolling though weapens in fsp games
mouse.WheelUp = Wiimote.Plus
mouse.WheelDown = Wiimote.Minus
// Rumbles wiimote when shift is pressed on your keyboard
Wiimote.Rumble = Shift
// If you move your controler up and down quickly then it will press space
// Great for jumping on games
if var.yRot >= 100 then space = true else space = false
endif
if wiimote.led2= 1 && wiimote.led1= 0
if wiimote.Up then wiimote.rumble = true
If wiimote.down then wiimote.rumble= false
endif
|
|
|
| Back to top |
|
 |
TigerGD
Joined: 16 Apr 2007 Posts: 71 Location: SoCal
Digg It |
Posted: Wed Sep 10, 2008 5:52 pm Post subject: Forsaken |
|
|
Details for usage and a video can be found in my column.
| Code: | /* Forsaken "Classic Wiimote" script
by Mike "Tiger" Sylvester
This script requires an IR sensor bar or other infrared source, and your Wiimote
must be physically mounted to your Classic Controller. A Nyko Classic
Controller Grip works as an inexpensive mounting solution.
*/
ArrowKeys = Classic.DPad //Menu navigation
Mouse.LeftButton = Classic.R //Primary gun
Mouse.RightButton = Classic.L //Secondary gun
Escape = Classic.Minus or Classic.B //Menu, back
Enter = Classic.Plus or Classic.A//Menu
Q = (Wiimote.SmoothRoll < -30) //Roll left
E = (Wiimote.SmoothRoll > 30) //Roll right
A = (Classic.Joy1Y < -.5) //Move forward
Z = (Classic.Joy1Y > .5) //Move backward
Numpad1 = (Classic.Joy1X < -.5) //Slide left
Numpad3 = (Classic.Joy1X > .5) //Slide right
S = Classic.ZL //Nitro
NumpadMinus = (Classic.Joy2Y < -.5) //Slide up
NumpadPlus = (Classic.Joy2Y > .5) //Slide down
Shift + P + I + E = Classic.Home or Wiimote.Home //Stop script running
// IRMouseFPS 1.0, for FPS games with a wiimote and sensor bar
// By Carl Kenner
PIE.FrameRate = 60Hz
var.BoxSize = 90%
var.BoxSpeed = 700 Mickeys // per half screen of movement
var.ScrollSpeed = 800 Mickeys per second
var.x = MapRange(Wiimote.PointerX, 0,1, -1,1)
var.y = MapRange(Wiimote.PointerY, 0,1, -1,1)
// Use a different system when the cursor is visible.
// Also, stop scrolling when the wiimote moves significantly
// while it is not pointing at the screen
If Mouse.CursorVisible
var.BeingUsed = False
If Wiimote.PointerVisible
Mouse.X = Wiimote.PointerX
Mouse.Y = Wiimote.PointerY
EndIf
ElseIf Wiimote.PointerVisible
var.BeingUsed = True
ElseIf |Wiimote.RelAcc| > 7
Var.BeingUsed = False
EndIf
If var.BeingUsed
If |var.X| < var.BoxSize
// pointer is inside the box (horizontally)
// so move based on change in pointer position
Mouse.DirectInputX += delta(var.X)*var.BoxSpeed
Else
// pointer is outside the box (horizontally)
// so scroll based on fixed rate and sign of x (+/-)
Mouse.DirectInputX += var.ScrollSpeed*sign(var.X)
EndIf
If |var.Y| < var.BoxSize
Mouse.DirectInputY += delta(var.Y)*var.BoxSpeed
ElseIf var.BeingUsed
Mouse.DirectInputY += var.ScrollSpeed*sign(var.Y)
EndIf
EndIf |
|
|
| Back to top |
|
 |
rpm
Joined: 13 Sep 2008 Posts: 1
Digg It |
Posted: Sat Sep 13, 2008 6:35 pm Post subject: |
|
|
Hi. I'm new to the forum.
Here's my script for Foobar2000 version 0.9.4.5
| Quote: | // Wiimote programmed for Foobar2000 version 0.9.4.5
// RPM 2008
//
// Credits for the Battery level - WiiBattery.PIE from Joseph Coulston
// with a little modification for this purpose
//
// Keys:
//
// Up: Random song
// Down: Battery state, show battery level for 3 seconds
// Left: Backwards the actual song 10 seconds
// Right: Forwards the actual song 10 seconds
// Home: Stops the music
// Minus: Volume -
// Plus: Volume +
// A: Next song
// B: Previous song
// 1: Play
// 2: Pause
Key.Z = wiimote.Home
Key.X = wiimote.Two
Key.C = wiimote.One
Key.V = wiimote.A
Key.Shift+Key.V = wiimote.B
Key.Left=wiimote.Left
Key.Right=wiimote.Right
Key.VolumeUp=wiimote.Plus
Key.VolumeDown=wiimote.Minus
Key.R=wiimote.Up
if pressed(wiimote.Down) then
//A full battery gives 0xC0 (192)
var.Batt = wiimote.Battery / 48
if true then
wait 5 seconds
//it sends an instruction that tells the Wiimote to actually
//send the report.
Wiimote.Report15 = 0x80 | Int(wiimote.Rumble)
end if
//Display the battery level of your wiimote using the four LEDs on the bottom.
//Battery level is displayed in four levels increasing to the right, like a cell
//phone battery gauge. As the battery gets close to the next level down, the LED
//for the current level will blink.
//Blink rate
//var.Blink = 500ms
debug = "Battery level: " + 100*48*var.Batt/192 + "%"
if 0<=var.Batt<=0.25 then
Wiimote.Leds = 1
wait var.Blink
Wiimote.Leds = 0
wait var.Blink
elseif 0.25 < var.Batt<=1 then
Wiimote.Leds = 1
elseif 1 < var.Batt<=1.25 then
Wiimote.Leds = 3
wait var.Blink
Wiimote.Leds = 1
wait var.Blink
elseif 1.25 < var.Batt<=2 then
Wiimote.Leds = 3
elseif 2 < var.Batt<=2.25 then
Wiimote.Leds = 7
wait var.Blink
Wiimote.Leds = 3
wait var.Blink
elseif 2.25 < var.Batt<=3 then
Wiimote.Leds = 7
elseif 3 < var.Batt<=3.25 then
Wiimote.Leds = 15
wait var.Blink
Wiimote.Leds = 7
wait var.Blink
elseif 3.25 < var.Batt<=4 then
Wiimote.Leds = 15
else
Wiimote.Leds = 0
endif
wait 3 seconds
wiimote.Led1=false
wiimote.Led2=false
wiimote.Led3=false
wiimote.Led4=false
end |
Hope you like it.
Cya |
|
| Back to top |
|
 |
freepupet
Joined: 26 Sep 2008 Posts: 1 Location: michigan
Digg It |
Posted: Fri Sep 26, 2008 8:25 pm Post subject: Hey Good idea |
|
|
relize i dont have that much experiance writing script but
if MapRange(Wiimote1.Pitch, -15 degrees,15 degrees, 0,1) then
Key.Left = false
Key.Right = false
endif
if MapRange(Wiimote1.Pitch, 15 degrees,90 degrees, 0,1) then
Key.Left = true
Key.Right = false
endif
if MapRange(Wiimote1.Pitch, -15 degrees,-90 degrees, 0,1) then
Key.Right = true
Key.Left = false
endif
If MapRange(Wiimote1.Roll, -15 degrees,15 degrees, 0,1) then
Key.Down = false
Key.Up = false
endif
If MapRange(Wiimote1.Roll, 15 degrees,90 degrees, 0,1) then
Key.Down = true
Key.Up = false
endif
If MapRange(Wiimote1.Roll, -15 degrees,-90 degrees, 0,1) then
Key.Up = true
Key.Down = false
endif
It will move around base on the angle of the wiimote _________________ www.freeyoureyes.com |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|