WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GlovePIE Script Requests
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
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%
 91%  [ 21 ]
Nah... If people want scripts they can write them themselves
8%
 8%  [ 2 ]
Total Votes : 23

Author Message
wii_128



Joined: 07 Jul 2008
Posts: 61

Digg It
PostPosted: 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 Sad)

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 Very Happy That's what came out of hours of doing nothing Razz
_________________
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
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
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