 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
wrathofzhan
Joined: 26 Dec 2007 Posts: 19
Digg It |
Posted: Fri Jun 06, 2008 6:31 pm Post subject: |
|
|
For the purposes of this script, I borrowed coding from both GMA and TigerGD. Due to my issues with Bluetooth HID Devices and ppjoy, I am unable to use ir aiming with ppjoy.analog. This script requires mouse aiming for Resident Evil 4, and uses a mouse script for aiming. Rest assured, Accuracy in this script is unbelievably good.
Be Sure to Download Resident Evil Mouse Aim 2.0 and its 1.1 mouse aim patch. These can be found through
http://www.moddb.com/downloads/6442/resident-evil-4-mouseaim-patch
http://www.moddb.com/downloads/6919/resident-evil-4-mouseaim-patch-11
In the Mouse Aim loader, set the mouse sensitivity to your discretion. Then, go to glovepie and enable my script. Trigger the script to aim mode, and enjoy!
/*'Resident Evil 4: Awesome Edition'
by Ran (wrathofzhan@gmail.com)
Thanks to GMA and Tiger for IR aiming and Key Bindings
*******************************************************************************
This script is designed to create a realistic approximation of accurate aiming with an IR sensor.
Before playing, download and install Resident Evil 4 MouseAim 2.0, a mod that can easily be found on google.
In the file loader for the Mouse Aim Mod, toggle Mouse sensitivity to your own discretion. Then, Run Glovpie.
In the debug Bar, toggle to Aim in order to play. If you read this and use this script, you agree to submit
to my awesomeness!
Controls:
D-pad = Move camera
B button = Ready weapon / Aim
C button = Ready knife
A button = Action, attack, confirm
'Minus' button = Status screen
'Plus' button = Call Ashley
'1' button = Map
'Home' button = Options, skip movies
Z button = Run (while moving forward), 180 turn (while moving backward)
B button + move Remote = Aim weapon
B button + shake Remote = Reload
C button + shake Remote = Knife attack
*/
var.speed = 1
Left = Wiimote.Left //Camera left
Right = Wiimote.Right //Camera right
Up = Wiimote.Up //Camera up
Down = Wiimote.Down //Camera down
LeftShift = Nunchuk.CButton //Ready knife
RightShift = Wiimote.B //Ready weapon
Enter = Wiimote.A //Action, attack, confirm
F = Wiimote.Plus //Call Ashley
I = Wiimote.Minus //Status screen
M = Wiimote.One //Map
Esc = Wiimote.Home //Options, skip movies
RightCtrl = Nunchuk.ZButton //Run, 180 turn
var.IRCount = 2
//Joystick movement
If Nunchuk.JoyY > 0.55
S = True
Wait 10ms
S = False
EndIf
If Nunchuk.JoyY > 0.35 and < 0.55
S = True
Wait 25ms
S = False
EndIf
If Nunchuk.JoyY > 0.15 and < 0.35
S = True
Wait 35ms
S = False
EndIf
If Nunchuk.JoyY < -0.55
W = True
Wait 10ms
W = False
EndIf
If Nunchuk.JoyY < -0.35 and > -0.55
W = True
Wait 25ms
W = False
EndIf
If Nunchuk.JoyY < -0.15 and > -0.35
W = True
Wait 35ms
W = False
EndIf
If Nunchuk.JoyX < -0.55
A = True
Wait 10ms
A = False
EndIf
If Nunchuk.JoyX < -0.35 and > -0.55
A = True
Wait 25ms
A = False
EndIf
If Nunchuk.JoyX < -0.15 and > -0.35
A = True
Wait 35ms
A = False
EndIf
If Nunchuk.JoyX > 0.55
D = True
Wait 10ms
D = False
EndIf
If Nunchuk.JoyX > 0.35 and < 0.55
D = True
Wait 25ms
D = False
EndIf
If Nunchuk.JoyX > 0.15 and < 0.35
D = True
Wait 35ms
D = False
EndIf
if Var.AbsolutePositioning then
debug = Var.Game + ", Mode: MOUSE, click <2> <home> to change"
else
debug = Var.Game + ", Mode: AIM, click <2> <home> to change. "
end if
If starting then
Var.Game = "ResidentEvil"
endif
if Var.Game = "ResidentEvil" then
var.Sensitivity = 0.05 // 0.05 for Resident Evil
endif
if Clicked(wiimote.Two + wiimote.Home) or starting then var.AbsolutePositioning = not var.AbsolutePositioning
if starting then
var.Margin = 1
end if
//Wiimote knife
If Nunchuk.CButton
Enter = (Wiimote.RawAccX > 15) or (Wiimote.RawAccX < -15)
var.Cam = "Aim"
EndIf
//Wiimote reload
If Wiimote.B
RightCtrl = (Wiimote.RawAccX > 15) or (Wiimote.RawAccX < -15)
EndIf
// Camera/Aim
var.Cam = "Move"
If Wiimote.B
var.Cam = "Aim"
ElseIf released(Wiimote.B)
W = False
A = False
S = False
D = False
Else
var.Cam = "Move"
EndIf
If var.Cam = "Aim"
if wiimote.dot1vis or wiimote.dot2vis then
if wiimote.dot1vis and wiimote.dot2vis then
var.DotX = (wiimote.dot1x + wiimote.dot2x) / 2
var.DotY = (wiimote.dot1y + wiimote.dot2y) / 2
Var.Rumble = false
else
if wiimote.dot1vis then
var.DotX = wiimote.dot1x
var.DotY = wiimote.dot1y
else if wiimote.dot2vis then
var.DotX = wiimote.dot2x
var.DotY = wiimote.dot2y
end if
end if
if var.AccX >= .7 and not Nunchuk.Exists then
Var.PY = var.DotX / (1024 - var.Margin * 2)
Var.PX = var.DotY / (640 - var.Margin * 2)
else if var.AccX <= -.7 and not Nunchuk.Exists then
Var.PY = (1024 - var.DotX) / (1024 - var.Margin * 2)
Var.PX = (640 - var.DotY) / (640 - var.Margin * 2)
else
Var.PX = (1024 - var.DotX) / (1024 - var.Margin * 2)
Var.PY = var.DotY / (640 - var.Margin * 2)
end if
var.PX = wiimote.PointerX
var.PY = wiimote.PointerY
var.NextX = screen.Width * Var.PX - var.Margin
var.NextY = screen.Height * Var.PY - var.Margin
Var.KeepRolling = true
if var.AbsolutePositioning then
mouse.cursorposx = var.NextX
mouse.cursorposy = var.NextY
end if
else if Var.KeepRolling and not var.AbsolutePositioning then
Var.Rumble = true
wait 2 seconds
Var.Rumble = false
Var.NextX = screen.Width / 2
Var.NextY = screen.Height / 2
Var.KeepRolling = false
end if
if not var.AbsolutePositioning then
Var.TrackX = Delta(var.NextX)
Var.TrackY = Delta(var.NextY)
if Var.TrackX = 0 then
if Var.NextX > screen.Width * .75 then Var.TrackX = screen.Width * .003
if Var.NextX < screen.Width * .25 then Var.TrackX = -screen.Width * .003
end if
if Var.TrackY = 0 then
if Var.NextY > screen.Height * .75 then Var.TrackY = screen.Height * .003
if Var.NextY < screen.Height * .25 then Var.TrackY = -screen.Height * .003
end if
if Var.TrackX > 0 then Var.TrackX *= var.Sensitivity * sqr(var.NextX / screen.Width)
if Var.TrackX < 0 then Var.TrackX *= var.Sensitivity * sqr(1 - (var.NextX / screen.Width))
if Var.TrackY > 0 then Var.TrackY *= var.Sensitivity * sqr(var.NextY / screen.Height)
if Var.TrackY < 0 then Var.TrackY *= var.Sensitivity * sqr(1 - (var.NextY / screen.Height))
mouse.DirectInputX += Var.TrackX
mouse.DirectInputY += Var.TrackY
end if
ElseIf var.Cam = "Move"
EndIf
var.dummy = Wiimote.RawForceX
var.dummy = Wiimote.RawForceZ |
|
| Back to top |
|
 |
lanasidoog
Joined: 04 Jun 2008 Posts: 6
Digg It |
Posted: Sun Jun 08, 2008 2:56 pm Post subject: wii fit balance board scripts anyone? |
|
|
| has anyone made any scripts in glovepie that work with the wii fit balance board?? |
|
| Back to top |
|
 |
TigerGD
Joined: 16 Apr 2007 Posts: 70 Location: SoCal
Digg It |
Posted: Sun Jun 08, 2008 6:15 pm Post subject: Re: wii fit balance board scripts anyone? |
|
|
| lanasidoog wrote: | | has anyone made any scripts in glovepie that work with the wii fit balance board?? | I'm finishing one right now, but there's a couple out already. |
|
| Back to top |
|
 |
lanasidoog
Joined: 04 Jun 2008 Posts: 6
Digg It |
Posted: Fri Jun 13, 2008 3:17 pm Post subject: awesome |
|
|
can't wait to see your balance board script!  |
|
| Back to top |
|
 |
TigerGD
Joined: 16 Apr 2007 Posts: 70 Location: SoCal
Digg It |
|
| Back to top |
|
 |
lanasidoog
Joined: 04 Jun 2008 Posts: 6
Digg It |
Posted: Fri Jun 13, 2008 8:09 pm Post subject: nice |
|
|
| yea saw that! cant wait till june 18th, left ya a comment on youtube |
|
| Back to top |
|
 |
lanasidoog
Joined: 04 Jun 2008 Posts: 6
Digg It |
Posted: Thu Jun 19, 2008 12:53 pm Post subject: hey tiger |
|
|
hey tiger, you should post the wrx script here for everyone else  |
|
| 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
|