 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Do you think there should be an team of "Script Authors" for GlovePIE scripts? |
| Definitely, it would be a great help! |
|
91% |
[ 21 ] |
| Nah... If people want scripts they can write them themselves |
|
8% |
[ 2 ] |
|
| Total Votes : 23 |
|
| Author |
Message |
wii_128

Joined: 07 Jul 2008 Posts: 61
Digg It |
Posted: Tue Sep 23, 2008 9:21 pm Post subject: |
|
|
| Shaderone wrote: | I'm looking for a code input that will let me
A) Start with button presses activating certain keyboard keys
B) Press the Wiimote Down key once to change the function of all of the other keys (in this case, changing each keyboard key) |
If I get it right, you want each wiimote button to work as a keyboard key, and pressing down on the dpad would change the whole mapping to other keys? Guess you could have a variable, and pressing down would change its value; depending on the value, the Wiimote buttons would work for specific keys:
| Code: | //-------------//
// Down button //
//-------------//
if Pressed(Wiimote.Down) and var.lol = 0 then
var.lol = 1
wait 300 ms
endif
if Pressed(Wiimote.Down) and var.lol = 1 then
var.lol = 2
wait 300 ms
endif
if Pressed(Wiimote.Down) and var.lol = 2 then
var.lol = 3
wait 300 ms
endif
if Pressed(Wiimote.Down) and var.lol = 3 then
var.lol = 4
wait 300 ms
endif
if Pressed(Wiimote.Down) and var.lol = 4 then
var.lol = 0
wait 300 ms
endif
//---------------//
// Keyboard keys //
//---------------//
if var.lol = 0 then
Wiimote.A = Key.A
Wiimote.B = Key.B
Wiimote.Minus = Key.C
Wiimote.Home = Key.D
Wiimote.Plus = Key.E
Wiimote.One = Key.F
Wiimote.Two = Key.G
endif
if var.lol = 1 then
Wiimote.A = Key.H
Wiimote.B = Key.I
Wiimote.Minus = Key.J
Wiimote.Home = Key.K
Wiimote.Plus = Key.L
Wiimote.One = Key.M
Wiimote.Two = Key.N
endif
if var.lol = 2 then
Wiimote.A = Key.O
Wiimote.B = Key.P
Wiimote.Minus = Key.Q
Wiimote.Home = Key.R
Wiimote.Plus = Key.S
Wiimote.One = Key.T
Wiimote.Two = Key.U
endif
// And so on. |
| Shaderone wrote: | | ... and noticed your "Hold B to C-Stick" controls. Fancy fancy, and I tried converting it to non PPJoy format, but failed. |
Try this script, it may work (my bluetooth dongle isn't working, so I can't test it )
| Code: | Debug = "D-Pad = C Buttons is currently " +var.ButtonC
if Wiimote1.B then
var.ButtonC = true
Wiimote1.Up = Key.Delete
Wiimote1.Down = Key.PageDown
Wiimote1.Left = Key.End
Wiimote1.Right = Key.Home
else
var.ButtonC = false
Wiimote1.Up = Key.Left
Wiimote1.Down = Key.Right
Wiimote1.Left = Key.Down
Wiimote1.Right = Key.Up
endif |
| Shaderone wrote: | | Wii_128, I've seen some of your N64 scripts (amazing, I may add) |
Thanks That's what came out of hours of doing nothing  _________________ Proud member of the .Pie Making Community!
... not like we do much there, anyway. Try to keep us working at http://www.wiili.org/forum/glovepie-script-requests-t3881-s21.html |
|
| 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
|