| View previous topic :: View next topic |
| Author |
Message |
ww2airborne
Joined: 07 Feb 2007 Posts: 10
Digg It |
Posted: Tue Mar 13, 2007 2:21 pm Post subject: |
|
|
i didnt make this but i use it for BF2
| Code: | //Unplayable BF2 Control Script by Duke4ever
//based on WinMouse Accel Script by vkapadia
//vkapadia@vkapadia.com
//
//Calibration:
//BF2 mouse sensibility need to be set to the min
//Change these values until the debug line says all zeros when the wiimote is at rest.
var.trimx = 11
var.trimy = -37
var.trimz = 12
//Set the D-Pad to function as the Arrow Keys
Up = wiimote.Up
Down = wiimote.Down
Left = wiimote.Left
Right = wiimote.Right
//Mouse Buttons
//aim
Mouse.RightButton = Wiimote.A
//fire
Mouse.LeftButton = Wiimote.B
//other buttons
//reload
Key.R = wiimote.plus
//crouch
Key.Z = wiimote.minus
//assault rifle mode switch
Key.Three = wiimote.One
//use
Key.E = wiimote.Two
//score
Key.Tab = wiimote.Home
//LEDs look somewhat like KITT's grill from Knight Rider
if 0 = 0 then
if var.kitt = 0 then
wiimote.Leds = 1
//wait 200 ms
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
//wait 200 ms
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 100 ms
var.kitt = (var.kitt + 1) % 8
endif
//rumble when firing!
if Wiimote.B then
if var.rmbl = false
wiimote.Rumble = 1
wait 50 ms
wiimote.Rumble = 0
endif
var.rmbl = true
else
var.rmbl = false
endif
//****Everything past here deals with mouse movement*****
// set these to the offsets when the wiimote is at rest
// will be different for each wiimote most likely
var.x = Wiimote.RawForceX + var.trimx //trim to 0
var.y = Wiimote.RawForceY + var.trimy // trim to 0
var.z = Wiimote.RawForceZ + var.trimz //trim to 0
//precision
var.sense0 = 1000
var.thresh0x = 2
var.thresh0y = 1
var.sense = 300
var.threshx = 10
var.threshy = 5
var.sense2 = 100
var.thresh2x = 15
var.thresh2y = 8
var.sense3 = 50
var.thresh3x = 20
var.thresh3y = 12
//first sensitivity setting
//xaxis
if var.x > var.thresh0x
mouse.x = mouse.x - 1/var.sense0
endif
if var.x < -var.thresh0x
mouse.x = mouse.x + 1/var.sense0
endif
//yaxis
if var.z > var.thresh0y
mouse.y = mouse.y - 1/var.sense0
endif
if var.z < -var.thresh0y
mouse.y = mouse.y + 1/var.sense0
endif
//second sensitivity setting
//xaxis
if var.x > var.threshx
mouse.x = mouse.x - 1/var.sense
endif
if var.x < -var.threshx
mouse.x = mouse.x + 1/var.sense
endif
//yaxis
if var.z > var.threshy
mouse.y = mouse.y - 1/var.sense
endif
if var.z < -var.threshy
mouse.y = mouse.y + 1/var.sense
endif
//third sensitivity setting
//xaxis
if var.x > var.thresh2x
mouse.x = mouse.x - 1/var.sense2
endif
if var.x < -var.thresh2x
mouse.x = mouse.x + 1/var.sense2
endif
//yaxis
if var.z > var.thresh2y
mouse.y = mouse.y - 1/var.sense2
endif
if var.z < -var.thresh2y
mouse.y = mouse.y + 1/var.sense2
endif
//fourth sensitivity setting
//xaxis
if var.x > var.thresh3x
mouse.x = mouse.x - 1/var.sense3
endif
if var.x < -var.thresh3x
mouse.x = mouse.x + 1/var.sense3
endif
//yaxis
if var.z > var.thresh3y
mouse.y = mouse.y - 1/var.sense3
endif
if var.z < -var.thresh3y
mouse.y = mouse.y + 1/var.sense3
endif
debug = var.x + " " + var.y + " " + var.z |
|
|
| Back to top |
|
 |
bluebarron
Joined: 13 Mar 2007 Posts: 2
Digg It |
Posted: Wed Mar 14, 2007 3:39 am Post subject: |
|
|
| ww2airborne wrote: | i didnt make this but i use it for BF2
| Code: | //Unplayable BF2 Control Script by Duke4ever
//based on WinMouse Accel Script by vkapadia
//
//Calibration:
//BF2 mouse sensibility need to be set to the min
//Change these values until the debug line says all zeros when the wiimote is at rest.
var.trimx = 11
var.trimy = -37
var.trimz = 12
//Set the D-Pad to function as the Arrow Keys
Up = wiimote.Up
Down = wiimote.Down
Left = wiimote.Left
Right = wiimote.Right
//Mouse Buttons
//aim
Mouse.RightButton = Wiimote.A
//fire
Mouse.LeftButton = Wiimote.B
//other buttons
//reload
Key.R = wiimote.plus
//crouch
Key.Z = wiimote.minus
//assault rifle mode switch
Key.Three = wiimote.One
//use
Key.E = wiimote.Two
//score
Key.Tab = wiimote.Home
//LEDs look somewhat like KITT's grill from Knight Rider
if 0 = 0 then
if var.kitt = 0 then
wiimote.Leds = 1
//wait 200 ms
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
//wait 200 ms
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 100 ms
var.kitt = (var.kitt + 1) % 8
endif
//rumble when firing!
if Wiimote.B then
if var.rmbl = false
wiimote.Rumble = 1
wait 50 ms
wiimote.Rumble = 0
endif
var.rmbl = true
else
var.rmbl = false
endif
//****Everything past here deals with mouse movement*****
// set these to the offsets when the wiimote is at rest
// will be different for each wiimote most likely
var.x = Wiimote.RawForceX + var.trimx //trim to 0
var.y = Wiimote.RawForceY + var.trimy // trim to 0
var.z = Wiimote.RawForceZ + var.trimz //trim to 0
//precision
var.sense0 = 1000
var.thresh0x = 2
var.thresh0y = 1
var.sense = 300
var.threshx = 10
var.threshy = 5
var.sense2 = 100
var.thresh2x = 15
var.thresh2y = 8
var.sense3 = 50
var.thresh3x = 20
var.thresh3y = 12
//first sensitivity setting
//xaxis
if var.x > var.thresh0x
mouse.x = mouse.x - 1/var.sense0
endif
if var.x < -var.thresh0x
mouse.x = mouse.x + 1/var.sense0
endif
//yaxis
if var.z > var.thresh0y
mouse.y = mouse.y - 1/var.sense0
endif
if var.z < -var.thresh0y
mouse.y = mouse.y + 1/var.sense0
endif
//second sensitivity setting
//xaxis
if var.x > var.threshx
mouse.x = mouse.x - 1/var.sense
endif
if var.x < -var.threshx
mouse.x = mouse.x + 1/var.sense
endif
//yaxis
if var.z > var.threshy
mouse.y = mouse.y - 1/var.sense
endif
if var.z < -var.threshy
mouse.y = mouse.y + 1/var.sense
endif
//third sensitivity setting
//xaxis
if var.x > var.thresh2x
mouse.x = mouse.x - 1/var.sense2
endif
if var.x < -var.thresh2x
mouse.x = mouse.x + 1/var.sense2
endif
//yaxis
if var.z > var.thresh2y
mouse.y = mouse.y - 1/var.sense2
endif
if var.z < -var.thresh2y
mouse.y = mouse.y + 1/var.sense2
endif
//fourth sensitivity setting
//xaxis
if var.x > var.thresh3x
mouse.x = mouse.x - 1/var.sense3
endif
if var.x < -var.thresh3x
mouse.x = mouse.x + 1/var.sense3
endif
//yaxis
if var.z > var.thresh3y
mouse.y = mouse.y - 1/var.sense3
endif
if var.z < -var.thresh3y
mouse.y = mouse.y + 1/var.sense3
endif
debug = var.x + " " + var.y + " " + var.z |
|
That works in the game? I didn't think it would because of the first line where it says unplayable script. |
|
| Back to top |
|
 |
|