 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
yankeessucka5s
Joined: 24 Jan 2007 Posts: 1
Digg It |
Posted: Wed Jan 24, 2007 8:21 pm Post subject: A few dumb questions. Mainly FPS game controls. |
|
|
Alright hello, I would like to know if you can use the Wii Remote and the Nunchuck on any FPS using Glovepie. I would also like to know if you can use a sensor bar for the computer?
For example, Could I use Wii Remote and nunchuck for brothers in arms?
Like I map out the buttons on both controler's and have the Wii Remote as a mouse. And use it on the X,Y,Z axis. Also Can I set it up To be Actually working on the sensor? I've read before about IR tracking but have no clue what that means. Does that mean that the Wii remote doesn't move on an axis and move's on the area your aimming at the sensor bar? And your movement?
Also can you play any game with these controls?
Do you need scripts for each game?
Is it simple once you set it up?
If I need scripts are there scripts for any of these games?
Americas Army,Red Orchestra, Armed Assault, Brother's In Arms?
Also do all of the buttons work and map out? As I've had problems with the UT2K4 engine not accepting my mouses middle mouse button and mouse 4 and mouse 5 button.
Thanks in advance.
 |
|
| Back to top |
|
 |
bomboy02
Joined: 07 Jan 2007 Posts: 17
Digg It |
Posted: Sat Jan 27, 2007 2:11 am Post subject: |
|
|
to answer your questions,
yes you can use the wiimote and nunchuk on any fps game, asuming the script you use has the correct keys coded in.
you can use the sensor bar with the computer, but if you use the Wii to power it you have to connect your wiimote to the computer before you turn the Wii on
IR tracking means useing the Wiimote as a pointer to control the mouse.
also there are some games don't respond to Wiimote IR tracking.
Heres a script i made for Americas Army, i'm have wiimote connection problems at the moment to i can't test this. if you run in to any problems tell me about them and i will do my best to fix it.
| Code: |
/*
Americas Army Script by bomboy02
using Direct Pointing Script With Wii-mote by Arianol v1.5
This PIE requires that you have either one or two IR points to aim the
Wiimote at. The Wii Sensor Bar is best for the two-point setting. At any
time you can point the Wiimote away from the light and Press 1 to move
your cursor back to center-screen. Please set the value of the following
variable equal to your number of infrared points (1 or 2). */
var.irAmount = 2 // 1 OR 2
/* Set these numbers so that the cursor reaches the edges
of your screen. (Defaults are both 1.1) */
var.xStretch = 1.2
var.yStretch = 1.1
/* Region where no motion is detected (in pixels). Higher values make the
cursor jumpier, but more precise if you have unsteady hands */
var.deadzone = 15
/* Speed at which the cursor moves (Default 1/5). 1 is instantaneous. */
var.Speed = 1/3
/*
all controls are set using default keys.
Movement
Forward, Backward, Strafe Left/Right = Nunchuck Joy
Lean Left/Right = Tilt Nunchuk Left/Right
Jump = Z
Speed Toggle = Plus
Crouch = C
Prone = C*2
Looking
Turn Left\Right, Look Up/Down = Wiimote IR
Weapons
Fire = B
Alt-Fire = A
Throw Weapon = Flick Wiimote
Zoom = D-Up
Reload = Flick Nunchuk
Fix Jam = Two
Weapon Selection
Swap Weapons = Minus
Frag Grenade |
Smoke Granade | cycle D-Right
Flash Granade |
Thermite Granade |
Pistol = One
Game
Action(Use) = D-Down
Binoculars = D-Left
Night Vision = D-Left*2
Misc.
Menu = Home
*/
//Movement
If Wiimote.Nunchuk.JoyY > .2
Key.S = 1
Key.S = 0
ElseIf Wiimote.Nunchuk.JoyY < -.2
Key.W = 1
Key.W = 0
Else
Key.S = 0
Key.W = 0
EndIf
If wiimote.nunchuk.JoyX > .2
Key.D = 1
Key.D = 0
ElseIf Wiimote.Nunchuk.JoyX < -.2
Key.A = 1
Key.A = 0
Else
Key.D = 0
Key.A = 0
EndIf
Key.Comma = Wiimote.Nunchuk.Roll < -60 degrees //Lean Left
Key.Dot = Wiimote.Nunchuk.Roll > 60 degrees //Lean Right
Key.Space = Wiimote.Nunchuk.ZButton //Jump
Key.Shift = Wiimote.Plus //Spped Toggle
Var.Crouch = False
Var.Prone = False
If Var.Crouch = False and Var.Prone = False Then //C to Crouch
Key.C = Wiimote.Nunchuk.CButton
Var.Crouch = True
ElseIf Var.Crouch or Var.Prone Then
Key.X = Wiimote.Nunchuk.CButton //C again to prone
Var.Crouch = False
Var.Prone = True
ElseIf Key.X and Var.Prone Then
Var.Prone = False
EndIf
//Weapons
Mouse.LeftButton = Wiimote.B //Fire
Mouse.MiddleButton = Wiimote.A //Alt-Fire
If Wiimote.RawAccY <= -32
Keyboard.BackSpace = 1
Else //Throw Weapon (Flick wiimote)
Keyboard.BackSpace = 0
EndIf
Mouse.RightButton = Wiimote.Up //Zoom
If Wiimote.Nunchuk.RawForceY >= 100
Key.R = 1
Else //Reload
Key.R = 0
EndIf
Key.F = Wiimote.Two //Fix Jam
//Weapon Selection
Key.One = Wiimote.Minus //Swap Weapons
Var.Frag = False
Var.Smoke = False
Var.Flash = False
Var.Thermite = False
If Var.Frag = False and Var.Smoke = False and Var.Flash = False and Var.Thermite = False Then //C to Crouch
Key.Two = Wiimote.Right //Frag Granade
Var.Frag = True
ElseIf Var.Frag Then
Key.Three = Wiimote.Right //Smoke Granade
Var.Frag = False
Var.Smoke = True
ElseIf Var.Smoke Then
Key.Four = Wiimote.Right //Flash Granade
Var.Smoke = False
Var.Flash = True
ElseIf Var.Flash or Var.Thermite Then
Key.Five = Wiimote.Right //Thermite Granade
Var.Flash = False
Var.Thermite = True
ElseIf Key.Five and Var.Thermite Then
Var.Thermite = True
EndIf
Keyboard.P = Wiimote.One //Pistol
//Game
Key.E = Wiimote.Down //Action(Use)
Var.Binoc = False
Var.Night = False
If Var.Binoc = False and Var.Night = False Then
Key.B = Wiimote.Left //Binoculars
Var.Binoc = True
ElseIf Var.Binoc or Var.Night Then
Key.X = Wiimote.Left //Night Vision
Var.Binoc = False
Var.Night = True
ElseIf Key.X and Var.Night Then
Var.Night = False
EndIf
//Misc
Keyboard.Esc = Wiimote.Home //Menu
//Controls rumble
If wiimote.B then
wiimote.Rumble = 1
wait 1 ms
wiimote.Rumble = 0
wait 25 ms
endif
If Pressed(Wiimote.A) Then
Wiimote.Rumble = 1
Wait 60 ms
Wiimote.Rumble = 0
Endif
//Wiimote Battery Display
//by J.Coulston
// Modified by Carl Kenner for GlovePIE 0.25
//A full battery gives 0xC0 (192)
var.Batt = wiimote.Battery / 48
if true then
wait 5 seconds
//it sends an instruction that tells the Wiimote to actually send the report.
Wiimote.Report15 = 0x80 | Int(wiimote.Rumble)
endif
//Display the battery level of your wiimote using the four LEDs on the bottom.
//Battery level is displayed in four levels increasing to the right, like a cell
//phone battery gauge. As the battery gets close to the next level down, the LED
//for the current level will blink.
//Blink rate
var.Blink = 500ms
if 0<=var.Batt<=0.25 then
Wiimote.Leds = 1
wait var.Blink
Wiimote.Leds = 0
wait var.Blink
elseif 0.25 < var.Batt<=1 then
Wiimote.Leds = 1
elseif 1 < var.Batt<=1.25 then
Wiimote.Leds = 3
wait var.Blink
Wiimote.Leds = 1
wait var.Blink
elseif 1.25 < var.Batt<=2 then
Wiimote.Leds = 3
elseif 2 < var.Batt<=2.25 then
Wiimote.Leds = 7
wait var.Blink
Wiimote.Leds = 3
wait var.Blink
elseif 2.25 < var.Batt<=3 then
Wiimote.Leds = 7
elseif 3 < var.Batt<=3.25 then
Wiimote.Leds = 15
wait var.Blink
Wiimote.Leds = 7
wait var.Blink
elseif 3.25 < var.Batt<=4 then
Wiimote.Leds = 15
else
Wiimote.Leds = 0
endif
/* Code for Pointing Mechanism
---------------------------
Do Not Modify */
// If two dots are visible, find midpoint
If var.irAmount = 2 Then
var.xPos = (Wiimote.dot1x + Wiimote.dot2x) / 2
var.yPos = (Wiimote.dot1y + Wiimote.dot2y) / 2
Else
var.xPos = Wiimote.dot1x
var.yPos = Wiimote.dot1y
EndIf
If Wiimote.dot1vis Then // If at least one IR point is visible
// Locate Infrared Point(s)
var.xPoint = (1-(round(var.xPos) / 1024)) * Screen.Width
var.yPoint = ((round(var.yPos) / 768)) * Screen.Height
// Create Virtual Grid System And Draw Point Coordinates
var.xGrid = var.xPoint - (Screen.Width / 2)
var.yGrid = var.yPoint - (Screen.Height / 2)
// Find Cursor on Grid
var.xCursor = Mouse.CursorPosX - (Screen.Width / 2)
var.yCursor = Mouse.CursorPosY - (Screen.Height / 2)
// Calculate Distance To Move
var.xDist = (var.xGrid - var.xCursor)
var.yDist = (var.yGrid - var.yCursor)
// Calculate Speed Multipliers
If abs(var.xDist / var.deadzone) > 1 Then
var.xMult = 1
Else var.xMult = abs(var.xDist / var.deadzone)
If abs(var.yDist / var.deadzone) > 1 Then
var.yMult = 1
Else var.yMult = abs(var.yDist / var.deadzone)
// Calculate New Cursor Position
If abs(var.xDist) > 0 Then
var.xCursor = (var.xCursor + var.xDist * var.Speed * var.xMult) * var.xStretch
EndIf
If abs(var.yDist) > 0 Then
var.yCursor = (var.yCursor + var.yDist * var.Speed * var.yMult) * var.yStretch
EndIf
// Move Cursor
Mouse.CursorPosX = var.xCursor + (Screen.Width / 2)
Mouse.CursorPosY = var.yCursor + (Screen.Height / 2)
// Backup Last Motions
var.xLast = var.xDist * var.xMult * var.Speed
var.yLast = var.yDist * var.yMult * var.Speed
// Assign the One button
Alt + Tab = Wiimote.Two
ElseIf Pressed(Wiimote.Two) Then
// Terminate Motion
var.xLast = 0
var.yLast = 0
Else
// Move Using Last Known Value
If var.xMult = 1 Then
Mouse.CursorPosX = Mouse.CursorPosX + var.xLast
If var.yMult = 1 Then
Mouse.CursorPosY = Mouse.CursorPosY + var.yLast
EndIf
Endif
Endif
// Debug
debug = 'Debug: Grid Coordinates: (' + var.xGrid + ', ' + var.yGrid + ')'
//debug = "Battery level: " + 100*48*var.Batt/192 + "%"
|
_________________ StarCraft 2
www.starcraft2.com
"Hell, it's about time." - Tychus Findlay
Wii #: 7041 2686 1913 6765
Pokemon diamond F/C: 0473 4276 9277 |
|
| Back to top |
|
 |
X-fi6
Joined: 26 Jan 2007 Posts: 9 Location: ZOMG YOU STALKER, YOU!!
Digg It |
Posted: Sat Jan 27, 2007 2:33 am Post subject: |
|
|
The latest version of GlovePIE supports the nunchuk, so yes, if you were to make / find a script then you can use the nunchuk.  _________________ Has the MSDN version of Microsoft Windows Vista Codename: Longhorn RTM build 6000 x86 and dislikes it.  |
|
| 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
|