GlovePIE:Geometry Wars
From WiiLi
(Redirected from Geometry Wars)
// Copyright by 2007 Klaus Post
// May be used or modified freely.
// v 2.0 Joystick added 01/13/08
// These controls requires either Nunchuk or Classic controller.
// If you have both, Classic is recommended.
// Left joystick is movement, right is shot direction and menu navigation.
// A is Select in menu.
// B is Bomb in game. Z on Nunchuk and R and L on Classic can also be used for bomb.
// Keyboard should have default settings in the game.
// *** Enabling Joystick mode ***
// Enabling joystick mode requires some setup, but it will allow
// sligty better controls in the game.
// First you need to install PPJoy - see Help/Preliminary Documentation,
// p.55 on how to install PPJoy.
// When you have configured a Virtual Joystick, you should change
// the following variable to true
var.useJoystick = false
// You need to configure "Firing" to also use the joystick in G.W.
// Enjoy!
if (var.useJoystick) {
if (wiimote.HasNunchuk) {
PPJoy.Analog0 = Wiimote.Nunchuk.JoyX
PPJoy.Analog1 = Wiimote.Nunchuk.JoyY
} else { // Classic
PPJoy.Analog0 = Wiimote.Classic.Joy1X
PPJoy.Analog1 = Wiimote.Classic.Joy1Y
PPJoy.Analog2 = Wiimote.Classic.Joy2X
PPJoy.Analog3 = Wiimote.Classic.Joy2Y
}
} else { // Map Joystick to keys
if (wiimote.HasNunchuk) {
Keyboard.w = Wiimote.Nunchuk.JoyY < -0.25
Keyboard.a = Wiimote.Nunchuk.JoyX < -0.25
Keyboard.s = Wiimote.Nunchuk.JoyY > 0.25
Keyboard.d = Wiimote.Nunchuk.JoyX > 0.25
} else { // Classic
Keyboard.Up = Wiimote.Classic.Joy2Y < -0.25
Keyboard.Left = Wiimote.Classic.Joy2X < -0.25
Keyboard.Down = Wiimote.Classic.Joy2Y > 0.25
Keyboard.Right = Wiimote.Classic.Joy2X > 0.25
Keyboard.w = Wiimote.Classic.Joy1Y < -0.25
Keyboard.a = Wiimote.Classic.Joy1X < -0.25
Keyboard.s = Wiimote.Classic.Joy1Y > 0.25
Keyboard.d = Wiimote.Classic.Joy1X > 0.25
}
}
if (wiimote.HasNunchuk) {
Keyboard.Up = Wiimote.Up
Keyboard.Down = Wiimote.Down
Keyboard.Left = Wiimote.Left
Keyboard.Right = Wiimote.Right
Keyboard.Enter = Wiimote.A
Keyboard.Space = Wiimote.B || Wiimote.Nunchuk.ZButton
Keyboard.Escape = Wiimote.Home
} else { // Classic
Keyboard.Enter = Wiimote.Classic.A
Keyboard.Space = Wiimote.Classic.B || Wiimote.Classic.R || Wiimote.Classic.L
Keyboard.Escape = Wiimote.Classic.Home
Keyboard.Up = Wiimote.Classic.Up
Keyboard.Down = Wiimote.Classic.Down
Keyboard.Left = Wiimote.Classic.Left
Keyboard.Right = Wiimote.Classic.Right
}
Wiimote.leds = 1

