|
|
|
#3608094 - 07/16/12 03:56 PM
Twin T.16000M setup for Mechwarrior Online
|
Junior Member
Registered: 07/15/12
Posts: 3
|
I'm trying to set up a pair of T.16000M joysticks for the upcoming Mechwarrior Online game, using TARGET. Here's what I've got so far: include "target.tmh"
alias T16001; // second T16000 handle, which will be used all mapping commands
int main()
{
if(Init(&EventHandle)) return 1;
&T16001 = GetIndexJoy(SelectUsbDevice("VID_044F&PID_B10A")); // expect a second T16000 to be plugged on USB
MapAxis(&T16000, JOYX, DX_ZROT_AXIS);
MapAxis(&T16000, JOYY, DX_Y_AXIS);
MapAxis(&T16001, JOYX, DX_X_AXIS);
MapAxis(&T16001, JOYY, DX_Z_AXIS);
MapKey(&T16000, TS1, DX1);
MapKey(&T16000, TS2, DX2);
MapKey(&T16000, TS3, DX3);
MapKey(&T16000, TS4, DX4);
MapKey(&T16001, TS1, DX5);
MapKey(&T16001, TS2, DX6);
MapKey(&T16001, TS3, DX7);
MapKey(&T16001, TS4, DX8);
MapKey(&T16000, B5, DX9);
MapKey(&T16000, B6, DX10);
MapKey(&T16000, B7, DX11);
MapKey(&T16000, B8, DX12);
MapKey(&T16000, B9, DX13);
MapKey(&T16000, B10, DX14);
MapKey(&T16001, B5, DX15);
MapKey(&T16001, B6, DX16);
MapKey(&T16001, B7, DX17);
MapKey(&T16001, B8, DX18);
MapKey(&T16001, B9, DX19);
MapKey(&T16001, B10, DX20);
MapKey(&T16000, H1U, DXHATUP);
MapKey(&T16000, H1R, DXHATRIGHT);
MapKey(&T16000, H1D, DXHATDOWN);
MapKey(&T16000, H1L, DXHATLEFT);
}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}No idea if I've got the axes right, but I can tidy that up once I've got access to the game. Broadly speaking, the idea is that right stick will cover targeting & firing weapons, whilst left stick covers mech movement and misc. Not sure if the right stick will work better in relative or absolute mode, and I'll probably want to fiddle around with sensitivity etc... but that's all for later. So, two more things I'd like do: 1) Map the hats. The chunk of define.tmh relating to the T.16000M has commented out entries for H1U / H1R / H1D / H1L (which I could just MapKey, though I'd be wasting four positions). Instead, there's an entry for IN_POSITION_HAT... but I don't know what to do with that. (Yes, n00b here). What I do know (from Device Analyser) is the values this takes (0 to 7, and 15 for the middle). 2) More interesting - what I'd really like to be able to do is set up a piece of code to cycle through a loop of DX keys each time one real button is pressed. So clicking TS1 maps to DX1 the first time, DX2 the second, DX3 the third, then back to DX1 again. Not rocket science, I know...
Edited by jonbly (07/17/12 03:16 PM)
|
|
Top
|
|
|
|
#3608674 - 07/17/12 03:26 PM
Re: Twin T.16000M setup for Mechwarrior Online
[Re: jonbly]
|
Junior Member
Registered: 07/15/12
Posts: 3
|
OK, got an email response from Thrustmaster and it's bad news - Target can only recognize one of the hats. Grr.
Fixed the code above to cover this.
And sure enough, changing the H1* lines back to look at &T16001 and it stops working...
|
|
Top
|
|
|
|
#3609337 - 07/18/12 02:50 PM
Re: Twin T.16000M setup for Mechwarrior Online
[Re: jonbly]
|
Junior Member
Registered: 07/15/12
Posts: 3
|
As for my other question, it's covered in the manual. Duh.
MapKey(&T16000, TS1, SEQ (DX1, DX2, DX3));
will cycle around DX1 DX2 DX3 DX1...
MapKey(&T16000, TS1, SEQ (SEQ (DX1, DX2, DX3), DX4, DX5));
would give DX1 DX4 DX5 DX2 DX4 DX5 DX3 DX4 DX5 DX1...
SetShiftButton(&T16000, TS2, &T16000, B1, B2, IOTOGGLE);
TS2 then moves between I & O. (Need to check if we actually need the UMD syntax here too - probably, alas).
MapKeyIO(&T16000, TS1, SEQ (DX1, DX2, DX3), SEQ (DX4, DX5, DX6));
Two sets of weapons, short (123) and long range (456) in two cycles.
|
|
Top
|
|
|
|
|
|
| |