Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4214291 - 01/07/16 06:34 PM Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick?  
Joined: Jan 2016
Posts: 4
selectandstart Offline
Junior Member
selectandstart  Offline
Junior Member

Joined: Jan 2016
Posts: 4
I'm playing Star Citizen, and I'm trying to use both a mouse and a joystick to control flying (a mouse allows for finer aiming of the nose towards enemies). Unfortunately, the game doesn't natively support additive controls for the same input, and what ends up happening is the joystick sometimes locks out the mouse axes of controls if they're used at the same time. What I want to create is a script that will simulate the mouse as a virtual joystick using the TARGET software. It also has to be toggleable on/off because there are portions of the game where mouse usage is required. Does anyone have the experience to know how to create a script like that?

Inline advert (2nd and 3rd post)

#4214358 - 01/07/16 09:13 PM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: selectandstart]  
Joined: Mar 2007
Posts: 483
Aullido Offline
Member
Aullido  Offline
Member

Joined: Mar 2007
Posts: 483
We are working on this here:

Mouse for Star Citizen

I have no heard of SpaceBlaze since my last post, maybe it worked or maybe not. I still don't grasp what is needed exactly.

#4214381 - 01/07/16 10:51 PM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: selectandstart]  
Joined: Jan 2016
Posts: 4
selectandstart Offline
Junior Member
selectandstart  Offline
Junior Member

Joined: Jan 2016
Posts: 4
We play the same game, but I don't know that we want the same thing. Star Citizen is a complex game with many different controller types supported, but that support is really #%&*$# at this stage. People are having to find all sorts of third-party solutions to be able to play it comfortably.

SpaceBlaze:

"In Citizen you walk around (and shoot) with the mouse.

I want to do that with the joystick.

I got 2 joysticks, and don't like another mouse next to it.

I fly with the joysticks, and I (and more players on the forums of the game) want to walk and shoot with it too."


I have never heard of someone wanting to do the first-person shooting sections with a joystick. I guess he really doesn't like swapping peripherals (controllers) for those parts. That sounds like it would be challenging. Hey, whatever works for him smile

What I was looking for was my mouse movement to be seen as the same as my t16000m joystick movement. Or in other words, to have moving my mouse around register as my t16000m joystick (or TARGET virtual joystick) making the movements. Star Citizen doesn't recognize two different controllers (or peripherals) trying to do the same type of action. When I move my spaceship with my joystick and my mouse at the same time, Star Citizen doesn't like it very much :p

OR,

I could make my joystick act as a mouse. Maybe that would be easier. Basically both devices movements have to be seen as coming from one source, or on controller (peripheral). That would actually make controlling easier probably.



This code also has to be able to be turned on and off with a toggle button in order to navigate the menus.

If you don't know a script to do this, then could you give me a better resource that would explain how I would do it? I can't find much on TARGET scripting outside of the basic scripting guide: http://ts.thrustmaster.com/download/acce...cs_v1.5_ENG.pdf

I have no experience with TARGET. I just got a t16000m for Star Citizen.

Last edited by selectandstart; 01/07/16 11:29 PM.
#4214479 - 01/08/16 05:35 AM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: selectandstart]  
Joined: Mar 2007
Posts: 483
Aullido Offline
Member
Aullido  Offline
Member

Joined: Mar 2007
Posts: 483
The first option I don't think is possible, unless the mouse pointer is seen as a unique object independent of the devices (mouses).

The second one it is easy:


MapAxis
(
&T16000,
JOYX,
MOUSE_X_AXIS,
AXIS_NORMAL,
MAP_RELATIVE
);

MapAxis
(
&T16000,
JOYY,
MOUSE_Y_AXIS,
AXIS_NORMAL,
MAP_RELATIVE
);


I think you will need to swap the joystick to its original mode:

MapAxis
(
&T16000,
JOYX,
DX_X_AXIS,
AXIS_NORMAL,
MAP_ABSOLUTE
);

MapAxis
(
&T16000,
JOYY,
DX_Y_AXIS,
AXIS_NORMAL,
MAP_ABSOLUTE
);


You can use a button to change modes:

Code:
MapKey
 (
  &T16000,
  SomeT16000ButtonNameHere,
  SEQ
   (
    EXEC("MapAxis(&T16000,JOYX,MOUSE_X_AXIS,AXIS_NORMAL,MAP_RELATIVE);MapAxis(&T16000,JOYY,MOUSE_Y_AXIS,AXIS_NORMAL,MAP_RELATIVE);"),
    EXEC("MapAxis(&T16000,JOYX,DX_X_AXIS,AXIS_NORMAL,MAP_ABSOLUTE);MapAxis(&T16000,JOYY,DX_Y_AXIS,AXIS_NORMAL,MAP_ABSOLUTE);")
   )
 );


I didn't check the code but must work. Give it a try, I am always lurking here if doesn't work for you.


Last edited by Aullido; 02/17/16 01:01 AM.
#4214554 - 01/08/16 01:55 PM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: Aullido]  
Joined: Jan 2016
Posts: 4
selectandstart Offline
Junior Member
selectandstart  Offline
Junior Member

Joined: Jan 2016
Posts: 4
Thanks smile It works great! That's some amazing software, there.

#4230463 - 02/18/16 05:19 AM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: selectandstart]  
Joined: Dec 2013
Posts: 46
Space the Blaze Offline
Blazer of Space
Space the Blaze  Offline
Blazer of Space
Junior Member

Joined: Dec 2013
Posts: 46
Hello.

I read you cry for help too. I have something elso for you.
Mouse Axis on your POV HAT. (So you can code WASD to the stick and snipe with the HAT)

https://forums.robertsspaceindustries.co...de-kinda#latest

On top my code was not quite doing what I wanted. In the middle of page one Synkc gave me working code that does not let Citizen freak out. And if you change the '2' in his cody by toggling.layering, you can have different speeds.

Last edited by SpaceBlaze; 02/18/16 05:20 AM.
#4230466 - 02/18/16 05:30 AM Re: Can Anyone Help Me Devise a Script to Simulate Mouse as Joystick? [Re: selectandstart]  
Joined: Dec 2013
Posts: 46
Space the Blaze Offline
Blazer of Space
Space the Blaze  Offline
Blazer of Space
Junior Member

Joined: Dec 2013
Posts: 46
https://forums.robertsspaceindustries.co...-one-but#latest

Here you can see how to code different speeds really handy. Just follow all the code naming speed there to understand smile
And then put it into the place of the '2' in Synkc's code.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Pride Of Jenni race win
by NoFlyBoy. 04/15/24 12:22 AM
It's Friday: grown up humor for the weekend.
by NoFlyBoy. 04/12/24 01:41 PM
OJ Simpson Dead at 76
by bones. 04/11/24 03:02 PM
They wokefied tomb raider !!
by Blade_RJ. 04/10/24 03:09 PM
Good F-35 Podcast
by RossUK. 04/08/24 09:02 AM
Gleda Estes
by Tarnsman. 04/06/24 06:22 PM
Food Safety and Bad Roommates
by KRT_Bong. 04/04/24 02:16 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0