joystick.cs

Post Reply
blankgirl
Posts: 322
Joined: Fri Dec 16, 2011 4:25 pm
Location: Nebraska, USA
Contact:

joystick.cs

Post by blankgirl »

Would it be possible to use an Xbox 360 controller with the joystick.cs script? I'll include the code just ffs

Code: Select all

// You can use the console command listInputDevices(); to list out your
// devices.  If you have a trackball or something, add an inputActivate for it
// like below.

inputActivate(joystick0);

EditActionMap("playMap.sae");

// movement axis
bindAction(joystick0, xAxis0, TO, IDACTION_STRAFE, Center, DeadZone, 0.04, Scale, 100);
bindAction(joystick0, yAxis0, TO, IDACTION_RUN, Center, DeadZone, 0.04, Scale, 100);

// The following lines are for panther XL or trackball people
// thanks Aslan for the info.  Uncomment the bindAction lines to activate.

// To change the sensitivity of the trackball, just edit the 0.6s at the end of each line
// increase for more sensitivity, decrease for less.

// bindAction(joystick0, slider0, TO, IDACTION_YAW, Center, DeadZone, 0.01, Scale, 0.6);
// bindAction(joystick0, slider1, TO, IDACTION_PITCH, Flip, Center, DeadZone, 0.01, Scale, 0.6);

Image
Lawlz wrote:
S']['U wrote:
DaJ4ck3L wrote:i love blank girl
:ghey:

You do know that blankgirl is a guy, right? :shh:
I think everyone knows this since he posts pictures of himself after a fucked-up nights. XD
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: joystick.cs

Post by DaJ4ck3L »

blankgirl wrote:Would it be possible to use an Xbox 360 controller with the joystick.cs script? I'll include the code just ffs

Code: Select all

// You can use the console command listInputDevices(); to list out your
// devices.  If you have a trackball or something, add an inputActivate for it
// like below.

inputActivate(joystick0);

EditActionMap("playMap.sae");

// movement axis
bindAction(joystick0, xAxis0, TO, IDACTION_STRAFE, Center, DeadZone, 0.04, Scale, 100);
bindAction(joystick0, yAxis0, TO, IDACTION_RUN, Center, DeadZone, 0.04, Scale, 100);

// The following lines are for panther XL or trackball people
// thanks Aslan for the info.  Uncomment the bindAction lines to activate.

// To change the sensitivity of the trackball, just edit the 0.6s at the end of each line
// increase for more sensitivity, decrease for less.

// bindAction(joystick0, slider0, TO, IDACTION_YAW, Center, DeadZone, 0.01, Scale, 0.6);
// bindAction(joystick0, slider1, TO, IDACTION_PITCH, Flip, Center, DeadZone, 0.01, Scale, 0.6);

I want to try this too, so when I do get around to it, I'll share code.
Image
User avatar
Fixious
Posts: 475
Joined: Sat Nov 09, 2013 12:42 am

Re: joystick.cs

Post by Fixious »

If you don't want to mess with the code you can use a program like xpadder http://www.xpadder.com/. I remember trying to play Tribes with the original Duke Xbox controller. So hilarious.
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: joystick.cs

Post by DaJ4ck3L »

update, so i tried to play around with it a little, and i could get movement to work perfect. rotation on the other hand was fucked. at least using a razer 360 controller. changed this (slider0) to rxAxis0 and ryAxis0, r being right, and you can get it to work, but the range it detects on the joystick isn't big enough. played with the variables for quite a bit with no luck. ended up using xpadder to map all the keys to keyboard / mouse, and it worked perfect (had to boost in game sensitivity up way higher than what i use with mouse). hard to get use to controller though, but i might give it a try for a bit.

EDIT: i see fix had the same idea lol. didn't see his post.
Image
Groove
Posts: 218
Joined: Thu Apr 17, 2014 10:36 pm

Re: joystick.cs

Post by Groove »

hey did u guys notice any difference with joystick support using the 1.41 .exe ?

i thought one of the memory locations for something joystick-related was overwritten in certain exes - the 1.40 scriptGL .exe, the 1.41 .exe and my win8pluginfix .exe all overwrite something to do with joysticks but i never tested it to see if it really broke anything
blankgirl
Posts: 322
Joined: Fri Dec 16, 2011 4:25 pm
Location: Nebraska, USA
Contact:

Re: joystick.cs

Post by blankgirl »

Any update on this topic?



blankgrrrrrrl
Image
Lawlz wrote:
S']['U wrote:
DaJ4ck3L wrote:i love blank girl
:ghey:

You do know that blankgirl is a guy, right? :shh:
I think everyone knows this since he posts pictures of himself after a fucked-up nights. XD
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: joystick.cs

Post by DaJ4ck3L »

i couldn't get joystick.cs to work standalone. ended up using this to get my 360 controller to work for tribes.

http://www.xpadder.com/

and to groove, i want to say i was using just 1.40, and it was still giving me issues with the rotation joystick.
Image
Post Reply