| View previous topic :: View next topic |
| Author |
Message |
wr194t
Joined: 17 Feb 2007 Posts: 4
Digg It |
Posted: Sat Feb 17, 2007 10:52 pm Post subject: any1 got a ir fps script with wiimote aiming, nunchuck wsad? |
|
|
| hi ive being trying for weeks to find a decent ir fps script but i cant find 1 i want to move up, down, left, right with nunchuck and aim with the wiimote previous scripts ive found do the oppisite or both move up, down, left, right can any1 help me oue please? |
|
| Back to top |
|
 |
speaker219
Joined: 28 Jan 2007 Posts: 187 Location: New York
Digg It |
Posted: Sun Feb 18, 2007 12:32 am Post subject: Re: any1 got a ir fps script with wiimote aiming, nunchuck w |
|
|
| wr194t wrote: | | hi ive being trying for weeks to find a decent ir fps script but i cant find 1 i want to move up, down, left, right with nunchuck and aim with the wiimote previous scripts ive found do the oppisite or both move up, down, left, right can any1 help me oue please? |
try some of these
http://www.wiili.org/index.php/GlovePIE_Scripts#FPS_Games_.28Relative_movement.29 |
|
| Back to top |
|
 |
Bubba Gump
Joined: 13 Feb 2007 Posts: 23
Digg It |
Posted: Sun Feb 18, 2007 10:39 pm Post subject: |
|
|
well i made one just for the nunchuk and ofund ir mouse movement, although it isnt the best. just ask if you want me to post it. _________________ Wiidelin away.. |
|
| Back to top |
|
 |
wr194t
Joined: 17 Feb 2007 Posts: 4
Digg It |
Posted: Wed Feb 21, 2007 3:50 pm Post subject: |
|
|
| ye could you post the script please? |
|
| Back to top |
|
 |
Bubba Gump
Joined: 13 Feb 2007 Posts: 23
Digg It |
Posted: Thu Feb 22, 2007 12:43 am Post subject: |
|
|
The script hasn't been tested with any FPSs.
//Move with WASD. This is the only part I wrote.
keyboard.w = wiimote1.nunchuk.joyy < -0.5
keyboard.a = wiimote1.nunchuk.joyx < -0.5
keyboard.s = wiimote1.nunchuk.joyy > 0.5
keyboard.d = wiimote1.nunchuk.joyx > 0.5
keyboard.r = wiimote1.nunchuk.cbutton
//Mouse Control Script using IR
//by vkapadia
//vkapadia@vkapadia.com
//
//Options:
var.smooth = 10 //how many frames to smooth over. higher = more smooth, less precise
//var.smooth doesnt work yet, if you want to change the smoothing,
//find the "Mouse.CursorPosX =" and "Mouse.CursorPosY =" lines and change
//the very last number (should be 10 initially) to whatever value.
var.KITTspeed = 100 ms //delay speed for flashing LEDs. higher = slower
//more options to be added later
//Controls:
//Point Wiimote = Move Mouse
//D-Pad = Arrow Keys
//B-Button = Left Click
//Home = Middle Click
//A-Button = Right Click
//Plus and Minus = Control Volume
//One = Unmapped
//Two = Unmapped
//
//If the pointer hits the edge of the screen, the Wiimote will rumble a bit.
//
//The LEDs attempt to emulate KITT's grill from Knight Rider
//Display the location of the mouse in Pixels
//debug = round(RemoveUnits(Mouse.x * screen.Width)) + ", " + round(RemoveUnits(Mouse.y * screen.Height))
//Set the D-Pad to function as the Arrow Keys
if wiimote.Up
Up = true
Wait 200 ms
Up = false
endif
if wiimote.Down
Down = true
Wait 200 ms
Down = false
endif
if wiimote.Left
Left = true
Wait 200 ms
Left = false
endif
if wiimote.Right
Right = true
Wait 200 ms
Right = false
endif
//Mouse Buttons
Mouse.RightButton = Wiimote.A
Mouse.LeftButton = Wiimote.B
Mouse.MiddleButton = Wiimote.Home
//Plus and Minus handle Volume
if wiimote.plus then
volumeup = true
wait 60 ms
volumeup = false
endif
if wiimote.minus then
volumedown = true
wait 60 ms
volumedown = false
endif
//wiimote.One
//wiimote.Two
//LEDs look somewhat like KITT's grill from Knight Rider
if 0 = 0 then
if var.kitt = 0 then
wiimote.Leds = 1
endif
if var.kitt = 1 then
wiimote.Leds = 3
endif
if var.kitt = 2 then
wiimote.Leds = 6
endif
if var.kitt = 3 then
wiimote.Leds = 12
endif
if var.kitt = 4 then
wiimote.Leds = 8
endif
if var.kitt = 5 then
wiimote.Leds = 12
endif
if var.kitt = 6 then
wiimote.Leds = 6
endif
if var.kitt = 7 then
wiimote.Leds = 3
endif
wait var.KITTspeed
var.kitt = (var.kitt + 1) % 8
endif
//If the mouse reaches the end, rumble for 200 milliseconds
if mouse.x = 0 or mouse.x = 1 or mouse.y = 0 or mouse.y = 1 then
if var.rmbl = false
wiimote.Rumble = 1
wait 200 ms
wiimote.Rumble = 0
endif
var.rmbl = true
else
var.rmbl = false
endif
if wiimote.dot1vis then
if abs(wiimote.dot1x - var.ox) > 1 then
Mouse.CursorPosX = smooth(((1024-wiimote.dot1x) * Screen.Width / 1024) * 1.1 - 50, 10)
var.ox = wiimote.dot1x
endif
if abs(wiimote.dot1y - var.oy) > 1 then
Mouse.CursorPosY = smooth(((wiimote.dot1y) * Screen.Height / 768) * 1.1 - 40, 10)
var.oy = wiimote.dot1y
endif
endif _________________ Wiidelin away.. |
|
| Back to top |
|
 |
wr194t
Joined: 17 Feb 2007 Posts: 4
Digg It |
Posted: Thu Feb 22, 2007 2:14 pm Post subject: |
|
|
| the nunchuck's fine but the aimer doesnt move in-game only on desktop. |
|
| Back to top |
|
 |
Bubba Gump
Joined: 13 Feb 2007 Posts: 23
Digg It |
Posted: Fri Feb 23, 2007 12:51 am Post subject: |
|
|
well that sucks. We need to find one that does, now don't we? _________________ Wiidelin away.. |
|
| Back to top |
|
 |
|