 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
GizmoTheGreen
Joined: 14 Nov 2006 Posts: 121
Digg It |
Posted: Mon Dec 25, 2006 8:51 pm Post subject: |
|
|
I made a Script thats useful for me while browsing the likes of 4chan, 7chan.12chan etc, i thought id share it with the world for safer "surfing"
i find it especially useful when my siblings are running around im the house
| Code: | //Browse the Pr0nz!
//Hide the Pr0nz!
LeftWindows && M = Wiimote2.A / Wiimote2.B / Wiimote1.A / Wiimote1.B
Down = Wiimote2.Down / Wiimote1.Down
Up = Wiimote2.Up / Wiimote1.Up
|
|
|
| Back to top |
|
 |
TylerK

Joined: 18 Dec 2006 Posts: 384 Location: Springfield, IL
Digg It |
Posted: Mon Dec 25, 2006 8:57 pm Post subject: |
|
|
| Why in the world are you using 2 remotes for something that simple? |
|
| Back to top |
|
 |
GizmoTheGreen
Joined: 14 Nov 2006 Posts: 121
Digg It |
Posted: Mon Dec 25, 2006 9:49 pm Post subject: |
|
|
becouse i personally have two wiimotes on my desktop, if i need to hide the porns and i took the wrong wiimote, then id be in trouble, in other words, the script only requires one wiimote, but can works on two, its fairly easy to add more if you have any
Edit: the / means "or" in glovePIE |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Tue Dec 26, 2006 9:32 am Post subject: |
|
|
| TylerK wrote: | I've got a question for you. I've noticed that when using the calibrated rotation values (gx, etc) they tend to go crazy when doing fast motions with the controller. It seems like the force you apply to the controller is added onto the rotation. Is there a way to consistently get the rotation of the controller no matter how swiftly it's being moved? Maybe subtract the relative force values or something?
Edit: just seeing if I can post links yet. http://www.google.com
Edit2: hooray! |
gx, gy, and gz aren't rotation values. They are just plain acceleration, the same as RawForceX, RawForceY and RawForceZ.
If you want rotation, use Wiimote.Pitch or Wiimote.Roll. |
|
| Back to top |
|
 |
Wizlon
Joined: 26 Dec 2006 Posts: 2 Location: England
Digg It |
Posted: Tue Dec 26, 2006 4:07 pm Post subject: |
|
|
Hi.
I'm not sure how old hat this is but i've created a PIE script I created for Winamp, unlike some other scripts this one is compatible with Winamps global hotkeys, it features a pause/play button mapped to B and a stop/play button mapped to A, it should allow you to mute your pc and allows for "turbofire" functionality with volume control and track searching, I've also added some interesting LED effects, sort of a real-time tactile feedback system.
This is my first PIE script so sorry about the huge section for the LED effects. Give it a try and let me know what you think. Oh and you'll need to enable Global Hot keys in Winamp (ctrl+p --> global hotkeys --> enable)
EDIT: I've made a few minor changes, mainly switching the B button to play/pause as its easier to knock it by accident.
| Code: | // Global Winamp control with extra flashy bits!!
// by Wizlon, roughly adapted from the WinampUltraII Turbo script by STKD
/*
Controls set to Wiimote buttons
-----------------
Stop/Play = A
Play/Pause = B
Next Track = 1
Prev Track = 2
Vol up = +
Vol down = -
Mute = Home
Skip forward = dpad Right
Skip backwards = dpad Left
ctrl + alt + X = dpad Up
ctrl + alt + Y = dpad Down
//create your own global shortcut in the format "ctrl + alt + X"
//and "ctrl + alt + Y" in winamp to use dpad Up and Down. */
// do you want the LED's telling you stuff? true or false
var.LEDsOn = true
//------ beginning of control code -------//
ctrl && alt && home = Wiimote.B // play/pause
ctrl && alt && pgdn = Wiimote.One //Next track ("1" button on Wiimote)
ctrl && alt && pgup = Wiimote.Two //Previous track ("2" button on Wiimote)
Key.Mute = Wiimote.Home //mutes speakers
if Wiimote.A then //B toggles stop and pause
if var.ps = 0 then
ctrl and alt and end = true //stop
ctrl and alt and end = false
var.ps = 1
wait 500ms
else if var.ps = 1 then
ctrl and alt and insert = true //play
ctrl and alt and end = false
var.ps = 0
end if
wait 500ms
end if
if Wiimote.Plus then //volume up
ctrl && alt && Up = true
ctrl && alt && Up = false
end if
if Wiimote.Minus then //volume down
ctrl && alt && Down = true
ctrl && alt && Down = false
end if
if Wiimote.left then //Jump back 5+ seconds
ctrl && alt && Left = true
ctrl && alt && Left = false
wait 100ms
end if
if Wiimote.right then //Jump forward 5+ seconds
ctrl && alt && Right = true
ctrl && alt && Right = false
wait 100ms
end if
if Wiimote.up then
ctrl && alt && x = true
ctrl && alt && x = false
wait 200ms
end if
if Wiimote.down then
ctrl && alt && y = true
ctrl && alt && y = false
wait 200ms
end if
//------ beginning of LED code -------//
if var.LEDsOn = true then
If Wiimote.one then
Wiimote.Led1 = true
wait 100ms
Wiimote.Led1 = false
Wiimote.Led2 = true
wait 100ms
Wiimote.Led2 = false
Wiimote.Led3 = true
wait 100ms
Wiimote.Led3 = false
Wiimote.Led4 = true
wait 100ms
Wiimote.Led4 = false
endif
If Wiimote.two then
Wiimote.Led4 = true
wait 100ms
Wiimote.Led4 = false
Wiimote.Led3 = true
wait 100ms
Wiimote.Led3 = false
Wiimote.Led2 = true
wait 100ms
Wiimote.Led2 = false
Wiimote.Led1 = true
wait 100ms
Wiimote.Led1 = false
endif
If Wiimote.right then
Wiimote.Led1 = true
wait 20ms
Wiimote.Led1 = false
Wiimote.Led2 = true
wait 20ms
Wiimote.Led2 = false
Wiimote.Led3 = true
wait 20ms
Wiimote.Led3 = false
Wiimote.Led4 = true
wait 20ms
Wiimote.Led4 = false
wait 150ms
endif
If Wiimote.left then
Wiimote.Led4 = true
wait 20ms
Wiimote.Led4 = false
Wiimote.Led3 = true
wait 20ms
Wiimote.Led3 = false
Wiimote.Led2 = true
wait 20ms
Wiimote.Led2 = false
Wiimote.Led1 = true
wait 20ms
Wiimote.Led1 = false
wait 150ms
endif
If Wiimote.A then
Wiimote.Led3 = true
Wiimote.Led2 = true
wait 800ms
Wiimote.Led2 = false
Wiimote.Led3 = false
endif
if Wiimote.B then
Wiimote.Led1 = true
Wiimote.Led4 = true
wait 200ms
Wiimote.Led1 = false
Wiimote.Led4 = false
Wiimote.Led2 = true
Wiimote.Led3 = true
wait 200ms
Wiimote.Led2 = false
Wiimote.Led3 = false
Wiimote.Led1 = true
Wiimote.Led4 = true
wait 200ms
Wiimote.Led1 = false
Wiimote.Led4 = false
endif
if Wiimote.home then
Wiimote.Led1 = true
Wiimote.Led2 = true
Wiimote.Led3 = true
Wiimote.Led4 = true
wait 20ms
Wiimote.Led1 = false
Wiimote.Led2 = false
Wiimote.Led3 = false
Wiimote.Led4 = false
wait 20ms
Wiimote.Led1 = true
Wiimote.Led2 = true
Wiimote.Led3 = true
Wiimote.Led4 = true
wait 20ms
Wiimote.Led1 = false
Wiimote.Led2 = false
Wiimote.Led3 = false
Wiimote.Led4 = false
endif
if Wiimote.Plus then
Wiimote.Led1 = true
wait 50ms
Wiimote.Led2 = true
wait 50ms
Wiimote.Led3 = true
wait 50ms
Wiimote.Led4 = true
wait 50ms
Wiimote.Led1 = false
wait 50ms
Wiimote.Led2 = false
wait 50ms
Wiimote.Led3 = false
wait 50ms
Wiimote.Led4 = false
wait 100ms
endif
if Wiimote.Minus then
Wiimote.Led4 = true
wait 50ms
Wiimote.Led3 = true
wait 50ms
Wiimote.Led2 = true
wait 50ms
Wiimote.Led1 = true
wait 50ms
Wiimote.Led4 = false
wait 50ms
Wiimote.Led3 = false
wait 50ms
Wiimote.Led2 = false
wait 50ms
Wiimote.Led1 = false
wait 100ms
endif
end if |
Last edited by Wizlon on Tue Dec 26, 2006 5:19 pm; edited 1 time in total |
|
| Back to top |
|
 |
TylerK

Joined: 18 Dec 2006 Posts: 384 Location: Springfield, IL
Digg It |
Posted: Tue Dec 26, 2006 4:23 pm Post subject: |
|
|
| CarlKenner wrote: | gx, gy, and gz aren't rotation values. They are just plain acceleration, the same as RawForceX, RawForceY and RawForceZ.
If you want rotation, use Wiimote.Pitch or Wiimote.Roll. |
But thank god you told me that. Now it makes much more sense to me. |
|
| Back to top |
|
 |
Arianol
Joined: 26 Dec 2006 Posts: 49
Digg It |
Posted: Tue Dec 26, 2006 9:20 pm Post subject: CoD |
|
|
NOTE: This script is now outdated. The newer version is a couple posts down.
This is a script for Call of Duty PC, with controls that are almost dead-on exactly like the ones for CoD3 on the Wii. I made it mostly myself, of course with some help on the pointing stuff from vkapadia and his single-IR aim script (with my own twist). Anyway, enjoy!
And if anyone likes this and/or wants to use part of it please let me know. If you think it sucks, or something is really awkward, please let me know that too.
| Code: | /* Code for playing Call of Duty PC with the Wii-Remote and Nunchuck
Control Arrangement done by Arianol */
/* This PIE requires that you have one IR point to aim the Wiimote at. A lit
teacandle sitting in a small glass works nicely and reduces fire hazard. At
any time you can point the Wiimote away from the dot and Press 1 to revert
back to natural mouse movement. */
// NOTE: You must configure the xOffset value below before using this PIE.
/* When configuring the offset please hold the nunchuk flat in your hand
and do not move it. You want to look at the debug output at the top of this
window, and modify the value of xOffset until the debug value equals 10. The
debug value will be very jumpy so just get as close as you can.
Ex: if you get -27 when xOffset = 10 then change the xOffset to 27 */
var.xOffset = 10
// Controls Look Speed (Default 80)
var.speed = 80
// Remote Controls
alt = Wiimote.Up // Change Rate-Of Fire
shift = Wiimote.Down // Melee
mouse.WheelUp = Wiimote.Left // Last Weapon
mouse.WheelDown = Wiimote.Right // Next Weapon
mouse.LeftButton = Wiimote.B // Primary Fire
mouse.RightButton = Wiimote.A /* Secondary Fire -> Change RightMouseButton
to Aim Down Sight instead of Toggle For
a more CoD3-like experience */
f = Wiimote.Minus // Use
r = Wiimote.Minus // Reload
Tab = Wiimote.Home // View Score
Escape = Wiimote.Plus // Menu
Windows + M = Wiimote.Two // Windows Key + M - Minimize
If Pressed(Shift) Then // Rumbles wiimote when shift is pressed
Wiimote.Rumble = True
wait 100 ms
Wiimote.Rumble = False
EndIf
// Nunchuck Controls
C = Wiimote.Nunchuk.ZButton // Crouch
If C = True Then
wait 500 ms
If C = True Then
Press Control //Prone
Release Control
EndIf
EndIf
Space = Wiimote.Nunchuk.CButton // Jump
q = Wiimote.Nunchuk.RawForceX + var.xOffset > 45 // Lean Left
e = Wiimote.Nunchuk.RawForceX + var.xOffset < -25 // Lean Right
// Control Stick Movement
w = Wiimote.Nunchuk.JoyY < -0.4
a = Wiimote.Nunchuk.JoyX < -0.4
s = Wiimote.Nunchuk.JoyY > 0.4
d = Wiimote.Nunchuk.JoyX > 0.4
// LED Lights
Wiimote.Led4 = four
Wiimote.Led3 = three
Wiimote.Led2 = two
Wiimote.Led1 = one
/* Code for Pointing Mechanism
---------------------------
Do Not Modify */
If wiimote.dot1vis Then // If dot is visible
var.actualX=((1-(round(Wiimote.dot1x)/1280))*Screen.Width)
var.speedX = ((var.actualX/((Screen.Width /2))) - 1) * var.speed
If abs(var.speedX) > 1 Then Mouse.CursorPosX = Mouse.CursorPosX+var.speedX
var.actualY=(((round(Wiimote.dot1y)/1024))*Screen.Height)
var.speedY = ((var.actualY/((Screen.Height /2))) - 1) * var.speed
If abs(var.speedY) > 1 Then Mouse.CursorPosY = Mouse.CursorPosY+var.speedY
var.lastX = var.speedX
var.lasty = var.speedY
Else // If dot is not visible use last known value
If abs(var.lastX) > 1 Then Mouse.CursorPosX = Mouse.CursorPosX+var.lastX
If abs(var.lastY) > 1 Then Mouse.CursorPosY = Mouse.CursorPosY+var.lastY
EndIf
// Revert back to natural mouse movement - Safeguard
If Pressed(Wiimote.One) Then
var.lastX = 0
var.lasty = 0
EndIf
// Debug
debug = 'Debug: X: ' + (Wiimote.Nunchuk.RawForceX + var.xOffset) |
Last edited by Arianol on Wed Dec 27, 2006 7:57 am; edited 1 time in total |
|
| 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
|