rambozo79
Joined: 15 Mar 2007 Posts: 7
Digg It |
Posted: Wed Mar 28, 2007 4:37 pm Post subject: Re: Dual Button Assignment Issues |
|
|
| supershadowdude wrote: | Heya. I've been working on a code for the last few hours. I'm new, obviously, and I can't seem to wrap my head around this.
What I'm aiming for is pretty simple: If home is pressed down on the Wiimote, then nunchuk.Cbutton will function as the delete key and nunchuk.ZButton will function as the Insert key. If home is not pressed, however, I want Cbutton to work as key eight and Zbutton to work as key f12. Basically, it's very erratic in practice and I was wondering if someone could point out what I was doing wrong.
|
I have been working with these same functions in a script just last night. Here is how I have been doing it.
| Quote: |
If wiimote.home = false then
wiimote.nunchuk.cbutton = key.eight
wiimote.nunchuk.zbutton = key.f12
endif
if wiimote.home = true and wiimote.nunchuk.cbutton = true then
key.delete = true
wait 10ms
key.delete = false
endif
if wiimote.home = true and wiimote.nunchuk.zbutton = true then
key.insert = true
wait 10ms
key.insert = false
endif
|
Atleast I think that is how I have been doing it. If my memory serves right.
Also, forgive me if I have some of the names of the keys wrong. I'm not sure off of the top of my head. |
|