sparhawk on 1/9/2010 at 14:29
I have some problems with GlovePIE and I would appreciate it if someone could help.
The first problem is that i regeisterd on their forum and I can't post anything, otherwise I would have gone there. Don't know whats wrong but everytime I try to post then the browser comes up with a blank page and is finished. The same happens when I try to PM the admin so I can't do that either. Anybody using their forum and experiencing the same problem?
The real problem is with a script.
I try to map the left/right mousebuttons and X/Y to WASD. This works. The tricky part is because I get a kind of deadlock. I want to use the left control key to map to the mouse button as well.
Unfortunately that's the part where it stops working, because in the script I don't know the real state of the mousebutton. So when the mouse button is pressed it sends a W key. But when the left control is NOT pressed it of course simulates that the mouse button is also not pressed, which in turn causes glovepie as well to think that the (real) mouse button is not pressed, and stops sending the W key. Apparently it interprets it's own states as the real hardware states, instead of acting as a kind of filter between the hardware and the software. :(
theBlackman on 1/9/2010 at 17:55
It always helps to tell the forum what your setup (system) is.
CPU
Operating system
Vcard
USB devices
and so on.
TBE on 1/9/2010 at 18:51
Worst control key setup ever. There's a reason no one uses the left mouse button for forward motion. Get used to using a more standard key setup, or use a game pad.
sparhawk on 1/9/2010 at 20:02
Thanks for the helpfull replies. :bored:
theBlackman on 1/9/2010 at 20:35
Quote Posted by sparhawk
Thanks for the helpfull replies. :bored:
The question about what system is valid. If you want help then the forum needs that information
Every system (XP, VISTA, Win7) and Vcards etc. all have differing solutions.
You may be bored, but your attitude is NOT GOING TO GET YOU HELP.
Ignore the off the wall comments such as that made by
TBE. Some people can't help being assholes. But don't join them with smartass remarks such as the quote above.
Al_B on 1/9/2010 at 20:59
Quote Posted by sparhawk
The real problem is with a script.
I try to map the left/right mousebuttons and X/Y to WASD. This works. The tricky part is because I get a kind of deadlock. I want to use the left control key to map to the mouse button as well.
Do you have more details about which controller and game you're trying to use with GlovePIE and a link to the script? I've only used it briefly myself with a Wii remote so may not be able to help but some more info
would go a long way.
Also, I'm slightly confused by you wanting to map to left control to the mouse button. Do you mean a control on the game controller or the actual control key on your keyboard? If the latter, are you trying to map it to the "move forward" action in the game - not necessarily the mouse button itself?
sparhawk on 2/9/2010 at 07:30
Quote Posted by Al_B
Do you have more details about which controller and game you're trying to use with GlovePIE and a link to the script?
It's simply a mouse.
The script looks like this at the moment:
Code:
if starting then {
var.GameMapping = false;
var.AllowSwitch = true;
var.WaitRelease = false;
var.Forward = false;
var.Backward = false;
var.Left = false;
var.Right = false;
var.Fire = false;
var.AltFire = false;
var.Reset = false;
}
if(Keyboard.LeftWindows and G) {
if(var.WaitRelease == false) {
var.AllowSwitch = true;
var.WaitRelease = true;
}
}
if(Keyboard.LeftWindows and Z) {
var.Reset = true;
}
if(var.AllowSwitch == true) {
var.GameMapping = not var.GameMapping;
var.AllowSwitch = false;
}
if(var.WaitRelease == true) {
if(not(Keyboard.LeftWindows and G)) {
var.WaitRelease = false;
}
}
if(var.GameMapping == true) {
if(pressed(Mouse.LeftButton)) {
var.Forward = true;
}
if(released(Mouse.LeftButton)) {
var.Forward = false;
}
if(pressed(Mouse.RightButton)) {
var.Backward = true;
}
if(released(Mouse.RightButton)) {
var.Backward = false;
}
if(pressed(Keyboard.Z)) {
var.Left = true;
}
if(released(Keyboard.Z)) {
var.Left = false;
}
if(pressed(Keyboard.X)) {
var.Right = true;
}
if(released(Keyboard.X)) {
var.Right = false;
}
if(pressed(Keyboard.LeftControl)) {
var.Fire = true;
}
if(released(Keyboard.LeftControl)) {
var.Fire = false;
}
if(pressed(Keyboard.LeftAlt)) {
var.AltFire = true;
}
if(released(Keyboard.LeftAlt)) {
var.AltFire = false;
}
Mouse.SwallowButtons = true;
swallow(Mouse.LeftButton);
swallow(Mouse.RightButton);
swallow(Keyboard.X);
swallow(Keyboard.Z);
swallow(Keyboard.LeftControl);
swallow(Keyboard.LeftAlt);
if(var.Forward == true) {
press(Keyboard.W);
release(Keyboard.W);
}
if(var.Backward == true) {
press(Keyboard.S);
release(Keyboard.S);
}
if(var.Left == true) {
press(Keyboard.A);
release(Keyboard.A);
}
if(var.Right == true) {
press(Keyboard.D);
release(Keyboard.D);
}
if(var.Backward == true) {
press(Keyboard.S);
release(Keyboard.S);
}
if(var.Fire == true) {
press(Mouse.LeftButton);
release(Mouse.LeftButton);
}
if(var.AltFire == true) {
press(Mouse.RightButton);
release(Mouse.RightButton);
}
} else {
Mouse.SwallowButtons = false;
var.Reset = true;
}
if(var.Reset == true) {
var.Reset = false;
var.Forward = false;
var.Backward = false;
var.Left = false;
var.Right = false;
var.Fire = false;
var.AltFire = false;
}
Quote:
Also, I'm slightly confused by you wanting to map to left control to the mouse button. Do you mean a control on the game controller or the actual control key on your keyboard? If the latter, are you trying to map it to the "move forward" action in the game - not necessarily the mouse button itself?
what I want to have is this:
Forward -> Left Mouse
Backward -> Right Mouse
Move Left -> Z
Move Right -> X
Fire -> Left Control
Alternate Fire -> Left Alt
The problem is that Left Mouse is hardcoded by the game to fire (as usual :tsktsk:) So I map the left mouse to W and left control to left mouse.
So when I press the mouse button the character moves, but when I press Left Control the movement stops, because my script sends a left mouse press/release. GlovePie seems to read it's own message back and thinks I released the mouse button while it is still held. So it looks as if GlovePie reads the same data that it sends, which doesn't really make sense, because this is just a virtual message and doesn't necessarily reflect the physical state of the device.
sparhawk on 2/9/2010 at 16:37
So I stopped using GlovePIE and use Key Remapper from ATNSoft now. Works much better, because Glovepie also tends to loose keystrokes in some cases.
Al_B on 2/9/2010 at 17:22
Probably a better choice if you're not wanting to use a non-PC controller with it. Which game didn't allow you to remap the keys to something you'd like?
sparhawk on 4/9/2010 at 09:22
Quote Posted by Al_B
Probably a better choice if you're not wanting to use a non-PC controller with it. Which game didn't allow you to remap the keys to something you'd like?
At the moment? Jericho and Two Worlds.
There are always some which provide only partial customization. Don't know whats wrong with the developers... :devil: