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 

Help with Glovepie Script for F.E.A.R

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Remote and Nunchuck
View previous topic :: View next topic  
Author Message
Vaughan14



Joined: 28 Jan 2007
Posts: 32
Location: Australia

Digg It
PostPosted: Sun Jan 28, 2007 11:04 am    Post subject: Help with Glovepie Script for F.E.A.R

I recently got my hands on F.E.A.R and i wanted to use the Wii remote and nunchuk in the game. Everything works bar the mouse the mouse jumps and returns to the center once you move! If you have a copy of F.E.A.R can you please help me out. I think the problem is that the cursor needs to return to the center point a few times a second.

Code:
//Wii Remote F.E.A.R Script By vaughan Wellington.
//Wii Remote
Key.F = wiimote.A
Mouse.LeftButton = Wiimote.B
Key.Shift = wiimote.Plus
Key.C = wiimote.Minus
Key.Z = wiimote.Home
Key.Ctrl = wiimote.One
Key.X = wiimote.Two
Mouse.WheelUp = wiimote.Up
Mouse.WheelDown = wiimote.Down
Key.Q = wiimote.Left
Key.E = wiimote.Right
//Wii Nunchuk
Key.D = 1 > Wiimote1.Nunchuk.JoyX > 0.5
Key.A = -1 < Wiimote1.Nunchuk.JoyX < -0.5
Key.W = -1 < Wiimote1.Nunchuk.JoyY < -0.5
Key.S = 1 > Wiimote1.Nunchuk.JoyY > 0.5
Key.G = Wiimote.Nunchuk.CButton
Key.Space = Wiimote.Nunchuk.ZButton
//Wii Remote Leds flash when you shoot or throw a grenade
Wiimote.Led1 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led2 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led3 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led4 = Wiimote.B or Wiimote.Nunchuk.CButton
//Wii Remote Aiming, (mouse)
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6
var.xOffset = 0
var.yOffset = 0
var.zOffset = 0
// Change this if you would like your mouse to go faster (originally on 1)
var.speed = .4
// Steadiness of your hands higher if you aren't steady (Two down)
var.xCutoff = 12.5
var.zCutoff = 12.5
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
debug = 'X:' + var.xRot + ', ' + 'Y:' + var.yRot + ', ' + 'Z:' + var.zRot
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot + var.zCutoff)

_________________
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Vaughan14



Joined: 28 Jan 2007
Posts: 32
Location: Australia

Digg It
PostPosted: Sun Jan 28, 2007 3:03 pm    Post subject:

I seem to have cleaned the script up and fixed the problem, after all the trouble with the mouse I figured out that arrow keys doubled as the mouse...

Here is the finished script:

Code:
//Wii Remote F.E.A.R Script By vaughan Wellington.
//Wii Remote
Key.F = wiimote.A
//Action/Open doors/Hit Switches
Mouse.LeftButton = Wiimote.B
//Fire Weapon
Key.Shift = wiimote.Plus
//Zoom
Key.C = wiimote.Minus
//Crouch
Key.Z = wiimote.Home
//Use Medikit
Key.Ctrl = wiimote.One
//SlowMo
Key.X = wiimote.Two
//FlashLight
Mouse.WheelUp = wiimote.Up
//Change Weapon Up
Mouse.WheelDown = wiimote.Down
//Change Weapon Down
Key.Q = wiimote.Left
//Lean Left
Key.E = wiimote.Right
//Lean Right
//Wii Nunchuk
//Right
Key.D = 1 > Wiimote1.Nunchuk.JoyX > 0.5
//Left
Key.A = -1 < Wiimote1.Nunchuk.JoyX < -0.5
//Up
Key.W = -1 < Wiimote1.Nunchuk.JoyY < -0.5
//Down
Key.S = 1 > Wiimote1.Nunchuk.JoyY > 0.5
//Grenade
Key.G = Wiimote.Nunchuk.CButton
//Jump
Key.Space = Wiimote.Nunchuk.ZButton
//Wii Remote Leds flash when you shoot or throw a grenade
Wiimote.Led1 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led2 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led3 = Wiimote.B or Wiimote.Nunchuk.CButton
Wiimote.Led4 = Wiimote.B or Wiimote.Nunchuk.CButton
//Wii Remote Aiming, (mouse)
//Aim Up
Key.Up = Wiimote.smoothPitch > -13.33333 degrees
//Aim Left
Key.Left = Wiimote.smoothroll < -17.5 degrees
//Aim Down
Key.Down = Wiimote.smoothPitch < 13.33333 degrees
//Aim Right
Key.Right = Wiimote.smoothroll > 17.5 degrees

Very Happy
_________________
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 -> Wii Remote and Nunchuck All times are GMT
Page 1 of 1

 
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