Jump to content

Solbeamer

Members
  • Posts

    17
  • Joined

  • Last visited

  1. https://forums.robertsspaceindustries.com/discussion/315586/t-a-r-g-e-t-working-mouse-code#latest Synkc helped me out here with solid working code. Thank you Synkc!
  2. Thanks. Not exactly what I was looking for but maybe helpfull. I found that switching scripts in Star Citizen gives no problems. But a quickbind for it speeds it up by a few seconds. Not too bad.. unless clicking the second quickbind in windows closes the program. In which case I also then need to restart star citizen so it recognizes TARGET again :). Then I lose 7-8 minutes getting in dogfight again. :D
  3. Hello. I am back. My first prio is flying in Star Citzen. And your problem seems like a tough one. It would take me days where others would only requires 2 hours tops. Try asking here if eagles could not help. https://forums.robertsspaceindustries.com/categories/hardware There are some more TARGET know-what's/pro's there now.
  4. I found something interesting. But don't got it working. http://simhq.com/forum/ubbthreads.php/topics/3504421/2 I build the following stuff. But my 'stopper' still only get's understood if I press the TS3. If I execute the code (what's with the blue letter b.t.w? ... :P ) , the stopper doesn't seem to get activated, and the code freezes after the first pixel. So something 'stops'it :) Also I have no idea what to put in the main, and what above it. I've been at it for hours now... many, many hours.. (what time is it? hmmm... lol..) I hope my code below makes kinda sense. include "target.tmh" //mouse test file alias T16001; // second T16000 handle, which will be used all mapping commands alias T16A; // for handy switching purposes only alias T16B; // same here define switchthem 1 // make 0/1 if left=right int Stopper; int Rrr; int Lll; int Ddd; int Uuu; short speed; int set_mouse_cursor_speed (short speed) { //MapKey(&T16001, H1U, AXIS (MOUSE_Y_AXIS, -1, speed)); //MapKey(&T16001, H1D, AXIS (MOUSE_Y_AXIS, 1, speed)); //MapKey(&T16001, H1L, AXIS (MOUSE_X_AXIS, -1, speed)); //MapKey(&T16001, H1R, AXIS (MOUSE_X_AXIS, 1, speed)); Uuu = EXEC("MapKey(&T16001, H1U, AXIS (MOUSE_Y_AXIS, -1, speed));"); Ddd = EXEC("MapKey(&T16001, H1D, AXIS (MOUSE_Y_AXIS, 1, speed));"); Lll = EXEC("MapKey(&T16001, H1L, AXIS (MOUSE_X_AXIS, -1, speed));"); Rrr = EXEC("MapKey(&T16001, H1R, AXIS (MOUSE_X_AXIS, 1, speed));"); //Stopper = EXEC("DXAxis(MOUSE_X_AXIS, 0);" "DXAxis(MOUSE_Y_AXIS, 0);"); } int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&Joystick, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; // declare the event handler, return on error &T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A")); //pc expects a joystick on this adress if (switchthem) { &T16A = &T16000; &T16B = &T16001; &T16000 = &T16B; &T16001 = &T16A; } // this was about making the left one right and vice... set_mouse_cursor_speed (60); //too slow? make number smaller both here, and below in code right stick! But i.c.w. the stick movement itself it's speedy enough I think.. Uuu = EXEC("MapKey(&T16001, H1U, AXIS (MOUSE_Y_AXIS, -1, speed));"); Ddd = EXEC("MapKey(&T16001, H1D, AXIS (MOUSE_Y_AXIS, 1, speed));"); Lll = EXEC("MapKey(&T16001, H1L, AXIS (MOUSE_X_AXIS, -1, speed));"); Rrr = EXEC("MapKey(&T16001, H1R, AXIS (MOUSE_X_AXIS, 1, speed));"); Stopper = EXEC("DXAxis(MOUSE_X_AXIS, 0);" "DXAxis(MOUSE_Y_AXIS, 0);"); //MapKey(&Joystick, H1U, EXEC("if(flag1) ActKey(KEYON+MouseU); else ActKey(KEYON+DXHATUP);")); // starts it moving //MouseUO = CHAIN(EXEC("ActKey(MouseU);"),EXEC("TrimDXAxis(MOUSE_Y_AXIS,SET(0));")); MapKey(&T16001, H1U, CHAIN ( EXEC ("ActKey(Stopper);") , D(10), Uuu) ); MapKey(&T16001, H1D, CHAIN (Stopper , D(10), Ddd) ); MapKey(&T16001, H1L, CHAIN (ActKey(Stopper), D(10), Lll) ); MapKey(&T16001, H1R, CHAIN (ActKey(Stopper), D(10), Rrr) ); /////// right stick // working with mouse speed MapKeyR (&T16000, TS2, EXEC("set_mouse_cursor_speed(60);" )); //here we get slow mouse cursor again MapKey (&T16000, TS2, EXEC("set_mouse_cursor_speed(20);" )); // here comes fast mouse cursor MapKey (&T16000, TS3, Stopper); //MapKey (&T16000, TS3, EXEC("DXAxis(MOUSE_X_AXIS, 0);""DXAxis(MOUSE_Y_AXIS, 0);")); // center mouse cursor to middle screen } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here }
  5. interesting... I find that pushing TS3 will let TARGET forget all about the calculation :) And it doesn't put the cursor in the middle of the screen like originaly intended. It stops it dead in it's track. Like we now kinda want. I am sure we can fiddle that into an EXEC? (if the CURRENT trick doesn't work). 2 option to tackle the problem now?
  6. I am looking at page 29/60 now of the script manual. Going to see if I can trick the axis going into CURRENT mode and forgetting the last calculations... If I succeed I will have reached another level, :D Feel free to post if you beat me to it. :)
  7. My old code (speed at 23, and axis at -100 and 100) gave me a cursor that runs away it instand speed. With this code all got slowed down so I could see what was going on with the cursor. It seems we cured one problem, and created another. The mouse and TARGET coded mouse are now linked :) So that is good. However.... we now got a funny mouse cursor :): When I keep it pushed it looks like it keeps adding up the pixels it should skip. It also skips way more then one pixel. Then when I go the other way with the cursor; instead of going the other way right away, it first subtracts values untill the cursor is dead in the screen, and only then does it start to go the other way. It does these things even faster if you don't keep it pushed down, but 'click' it all the time. (the POV button) I tried coding the axis to both ABSOLUTE and RELATIVE, but they seem to do the same stuff. So we got adding and subtracting of values when determining our mouse position now. I haven't checked it in SC yet. The jumps it makes are too big. We first have to fix that adding and subtracting I think. And making a pixel jump a pixel jump, and not 50k pixels :) But the mouses are linked. So that's good :)
  8. Alright; I tested it. This code gave a workable test: include "target.tmh" //mouse test file alias T16001; // second T16000 handle, which will be used all mapping commands alias T16A; // for handy switching purposes only alias T16B; // same here define switchthem 1 // make 0/1 if left=right int set_mouse_cursor_speed (short speed) { MapKey(&T16001, H1U, AXIS(MOUSE_Y_AXIS, -1, speed)); MapKey(&T16001, H1D, AXIS(MOUSE_Y_AXIS, 1, speed)); MapKey(&T16001, H1L, AXIS(MOUSE_X_AXIS, -1, speed)); MapKey(&T16001, H1R, AXIS(MOUSE_X_AXIS, 1, speed)); //MapAxis(&T16001, H1U, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); //MapAxis(&T16001, H1D, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); //MapAxis(&T16001, H1L, MOUSE_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); //MapAxis(&T16001, H1R, MOUSE_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis(&T16001, H1U, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_RELATIVE); MapAxis(&T16001, H1D, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_RELATIVE); MapAxis(&T16001, H1L, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE); MapAxis(&T16001, H1R, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE); } int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&Joystick, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; // declare the event handler, return on error &T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A")); //pc expects a joystick on this adress if (switchthem) { &T16A = &T16000; &T16B = &T16001; &T16000 = &T16B; &T16001 = &T16A; } // this was about making the left one right and vice... set_mouse_cursor_speed (60); //too slow? make number smaller both here, and below in code right stick! But i.c.w. the stick movement itself it's speedy enough I think.. /////// right stick // working with mouse speed MapKeyR (&T16000, TS2, EXEC("set_mouse_cursor_speed(60);" )); //here we get slow mouse cursor again MapKey (&T16000, TS2, EXEC("set_mouse_cursor_speed(20);")); // here comes faster mouse cursor MapKey (&T16000, TS3, EXEC( "DXAxis(MOUSE_X_AXIS, 0);" "DXAxis(MOUSE_Y_AXIS, 0);" )); // center mouse cursor to middle screen } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here }
  9. Hmmm... how do I do that? I can't find no kill-switch :)
  10. Hmm... I thought this was a general sim forum. But it's a producer, lol. Ok, I will kill it.
  11. I made some code that works in the script editor. But I lack the skills to test them good in swarm/dogfight. The Vanduul aliens are fingerpainting my cockpit the whole time. They don't care for us testing buttons, lol. This stuff I wrote (kinda proud of it ) is for 2 T16000M joysticks. include "target.tmh" // include "CaptSolbeamer_v1.0.ttm"...define stuff that does not exist :) //this code gives you thrust/brake on the LEFT stick, and stearing on the RIGHT alias T16001; // second T16000 handle, which will be used all mapping commands alias T16A; // for handy switching purposes only alias T16B; // same here define switchthem 1 // make 0/1 if left=right int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&Joystick, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; // declare the event handler, return on error &T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A")); //pc expects a joystick on this adress if (switchthem) { &T16A = &T16000; &T16B = &T16001; &T16000 = &T16B; &T16001 = &T16A; } // this was about making the left one right and vice... /////////////////////// //The Axis: //Left stick axis //thrust/backw, rolling and up/down (deadzones at 14%) KeyAxis (&T16000, JOYY, 0, AXMAP2 (LIST (0, 43, 57, 100), 'w', 0, 's')); // forward/backward KeyAxis (&T16000, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'q', 0, 'e')); //Strafe left/right KeyAxis (&T16000, RUDDER, 0, AXMAP2 (LIST (0, 43, 57, 100), 'f', 0, 'r')); // Strafe Down/Up //Right stick axis //yaw and pitch and : MapAxis (&T16001, JOYY, DX_Y_AXIS); //pitch KeyAxis (&T16001, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'a', 0, 'd')); // roll MapAxis (&T16001, RUDDER, DX_X_AXIS); //yaw SetSCurve (&T16001, JOYY, 0, 6, 0, 4, 0); // deadzone first number, SetSCurve (&T16001, RUDDER, 0, 12, 0, 4, 0); // 2nd = sensitivy (range -20/20) //////////////// // left stick.. MapKey (&T16000, TS1, MOUSE_LEFT); // fire w1 MapKey (&T16000, TS2, USB[0x2C]) ; // Spacebar = brake MapKey (&T16000, TS3, TEMPO ( CHAIN (USB[0xE6], 'm'), CHAIN (USB[0x2B], USB[0xE0]) , 850 ) ); // RALT(=R_MENU)+M/ TAB+LCTRL =Look ahead, or after 0,8 pushdown sec Head Look MapKey (&T16000, TS4, USB [0xE2] ); // Gimball locked (L_ALT=L_MENU) MapKey (&T16000, H1U, TEMPO ('u', 'g', 850 ) ) ; // PIN, CYCLE PINNED //MapKey (&T16000, H1D, // Second Reticle Speed...soon implemented by CIG I hope MapKey (&T16000, H1L, L_CTL+CAPS); //'CTRL+CAPS' = g-safe MapKey (&T16000, H1R, USB[0x39]); //'CAPS' = decouple //The buttons left stick: // 11,12,13 7,6,5 // [] // 16,15,14 8,9,10 MapKey (&T16000, B11, '1'); // power to group 1 MapKey (&T16000, B12, '2'); // Power to group 2 MapKey (&T16000, B13, '3'); // power to group 3 MapKey (&T16000, B16, '0'); // equalize powergrid MapKey (&T16000, B15, USB[0x5D]); // equalize shield powergrid (nump 5) MapKey (&T16000, B14, '.'); // Camera Looks behind me MapKey (&T16000, B7, USB[0x4A]); // focus HUD MapKey (&T16000, B6, USB[0x52]); // arrow UP MapKey (&T16000, B5, USB[0x28]); // Interact with HUD (ENTER) MapKey (&T16000, B8, USB[0x50]); // arrow LEFT MapKey (&T16000, B9, USB[0x51]); // arrow DOWN MapKey (&T16000, B10, USB[0x4F]); // arrow RIGHT ////////////////////////// ////////////////////////// //Right stick //rightstick POV: //U,D,L,R, bind ingame for ship follows reticle MapKey (&T16001, H1U, '8'); // Aim up MapKey (&T16001, H1D, '9'); // Aim down MapKey (&T16001, H1L, '6'); // Aim left MapKey (&T16001, H1R, '7'); // Aim right MapKey (&T16001, TS1, MOUSE_RIGHT ); // Fire w2 MapKey (&T16001, TS2, TEMPO (MOUSE_CENTER, 'z' , 850) ); //Mousewheel (missile) / FLARE MapKey (&T16001, TS3, DX3); // weapon 3 = mouse4 button MapKey (&T16001, TS4, 'x' ); // Cycle cm. (and missile cycle in future by tempo) /// 5,6,7 13,12,11 /// [] ///10,9,8 14,15,16 //shield stuff MapKey (&T16001, B5, USB[0x5F]); // nump7 MapKey (&T16001, B6, USB[0x60]); // nump8 MapKey (&T16001, B7, USB[0x61]); // nump9 MapKey (&T16001, B10, USB[0x5C]); // nump4 MapKey (&T16001, B9, USB[0x5A]); // nump2 MapKey (&T16001, B8, USB[0x5E]); // nump6 MapKey (&T16001, B13, ','); // zoom radar MapKey (&T16001, B12, 'o'); // toggle lights or ninja/mode MapKey (&T16001, B11, 't'); // Cycle (find) all enemies MapKey (&T16001, B14, 'k'); // cycle radar backw MapKey (&T16001, B15, 'j'); // cycle radar forward MapKey (&T16001, B16, R_ALT +'l'); // Ejectos (USB[0xE6]) (R_ALT=R_MENU) //doubletap bind ingame or with combining it with [ENTER] (B5 left sstick) //to go to camera view. B5, B7, B10 and B8 = top, bottom, left and right camera then } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here } And this is what it should do: Don't forget to apply the following.. ...the hat-problem! TARGET not finding it that is. It's a typo in the file TARGET itself makes. Solution: thanks to KrakkenSmacken (on the SC forum) for this:
  12. https://forums.robertsspaceindustries.com/discussion/186723/t-a-r-g-e-t-dual-sticks-t16000m-need-testers-and-helpers#latest Here is how the (my) code evolved :)
  13. Don't forget to apply the following.. ...the hat-problem! TARGET not finding it that is. It's a typo in the file TARGET itself makes. Solution: thanks to KrakkenSmacken (on the SC forum) for this:
  14. Thanks for being here. You know your T.A.R.G.E.T. :) I will look into Autohotkey. (not familiar with that) I already got some code that works in the script editor. But I lack the skills to test them good in swarm/dogfight. The Vanduul aliens are fingerpainting my cockpit the whole time. They don't care for us testing buttons, lol. This stuff I wrote (kinda proud of it :) ) is for 2 T16000M joysticks. include "target.tmh" // include "CaptSolbeamer_v1.0.ttm"...define stuff that does not exist :) //this code gives you thrust/brake on the LEFT stick, and stearing on the RIGHT alias T16001; // second T16000 handle, which will be used all mapping commands alias T16A; // for handy switching purposes only alias T16B; // same here define switchthem 1 // make 0/1 if left=right int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&Joystick, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; // declare the event handler, return on error &T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A")); //pc expects a joystick on this adress if (switchthem) { &T16A = &T16000; &T16B = &T16001; &T16000 = &T16B; &T16001 = &T16A; } // this was about making the left one right and vice... /////////////////////// //The Axis: //Left stick axis //thrust/backw, rolling and up/down (deadzones at 14%) KeyAxis (&T16000, JOYY, 0, AXMAP2 (LIST (0, 43, 57, 100), 'w', 0, 's')); // forward/backward KeyAxis (&T16000, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'q', 0, 'e')); //Strafe left/right KeyAxis (&T16000, RUDDER, 0, AXMAP2 (LIST (0, 43, 57, 100), 'f', 0, 'r')); // Strafe Down/Up //Right stick axis //yaw and pitch and : MapAxis (&T16001, JOYY, DX_Y_AXIS); //pitch KeyAxis (&T16001, JOYX, 0, AXMAP2 (LIST (0, 43, 57, 100), 'a', 0, 'd')); // roll MapAxis (&T16001, RUDDER, DX_X_AXIS); //yaw SetSCurve (&T16001, JOYY, 0, 6, 0, 4, 0); // deadzone first number, SetSCurve (&T16001, RUDDER, 0, 12, 0, 4, 0); // 2nd = sensitivy (range -20/20) //////////////// // left stick.. MapKey (&T16000, TS1, MOUSE_LEFT); // fire w1 MapKey (&T16000, TS2, USB[0x2C]) ; // Spacebar = brake MapKey (&T16000, TS3, TEMPO ( CHAIN (USB[0xE6], 'm'), CHAIN (USB[0x2B], USB[0xE0]) , 850 ) ); // RALT(=R_MENU)+M/ TAB+LCTRL =Look ahead, or after 0,8 pushdown sec Head Look MapKey (&T16000, TS4, USB [0xE2] ); // Gimball locked (L_ALT=L_MENU) MapKey (&T16000, H1U, TEMPO ('u', 'g', 850 ) ) ; // PIN, CYCLE PINNED //MapKey (&T16000, H1D, // Second Reticle Speed...soon implemented by CIG I hope MapKey (&T16000, H1L, L_CTL+CAPS); //'CTRL+CAPS' = g-safe MapKey (&T16000, H1R, USB[0x39]); //'CAPS' = decouple //The buttons left stick: // 11,12,13 7,6,5 // [] // 16,15,14 8,9,10 MapKey (&T16000, B11, '1'); // power to group 1 MapKey (&T16000, B12, '2'); // Power to group 2 MapKey (&T16000, B13, '3'); // power to group 3 MapKey (&T16000, B16, '0'); // equalize powergrid MapKey (&T16000, B15, USB[0x5D]); // equalize shield powergrid (nump 5) MapKey (&T16000, B14, '.'); // Camera Looks behind me MapKey (&T16000, B7, USB[0x4A]); // focus HUD MapKey (&T16000, B6, USB[0x52]); // arrow UP MapKey (&T16000, B5, USB[0x28]); // Interact with HUD (ENTER) MapKey (&T16000, B8, USB[0x50]); // arrow LEFT MapKey (&T16000, B9, USB[0x51]); // arrow DOWN MapKey (&T16000, B10, USB[0x4F]); // arrow RIGHT ////////////////////////// ////////////////////////// //Right stick //rightstick POV: //U,D,L,R, bind ingame for ship follows reticle MapKey (&T16001, H1U, '8'); // Aim up MapKey (&T16001, H1D, '9'); // Aim down MapKey (&T16001, H1L, '6'); // Aim left MapKey (&T16001, H1R, '7'); // Aim right MapKey (&T16001, TS1, MOUSE_RIGHT ); // Fire w2 MapKey (&T16001, TS2, TEMPO (MOUSE_CENTER, 'z' , 850) ); //Mousewheel (missile) / FLARE MapKey (&T16001, TS3, DX3); // weapon 3 = mouse4 button MapKey (&T16001, TS4, 'x' ); // Cycle cm. (and missile cycle in future by tempo) /// 5,6,7 13,12,11 /// [] ///10,9,8 14,15,16 //shield stuff MapKey (&T16001, B5, USB[0x5F]); // nump7 MapKey (&T16001, B6, USB[0x60]); // nump8 MapKey (&T16001, B7, USB[0x61]); // nump9 MapKey (&T16001, B10, USB[0x5C]); // nump4 MapKey (&T16001, B9, USB[0x5A]); // nump2 MapKey (&T16001, B8, USB[0x5E]); // nump6 MapKey (&T16001, B13, ','); // zoom radar MapKey (&T16001, B12, 'o'); // toggle lights or ninja/mode MapKey (&T16001, B11, 't'); // Cycle (find) all enemies MapKey (&T16001, B14, 'k'); // cycle radar backw MapKey (&T16001, B15, 'j'); // cycle radar forward MapKey (&T16001, B16, R_ALT +'l'); // Ejectos (USB[0xE6]) (R_ALT=R_MENU) //doubletap bind ingame or with combining it with [ENTER] (B5 left sstick) //to go to camera view. B5, B7, B10 and B8 = top, bottom, left and right camera then } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here } And this is what it should do:
×
×
  • Create New...