Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Joystick and keypressed condition

Author
Message
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 30th Jun 2013 12:02
Hi everyone!
I've a quick question: is it possible to check keys and triggers pressed on the xbox 360 joystick when using fpsc(you know, each button has a relative number)? Thx
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 30th Jun 2013 17:46 Edited at: 30th Jun 2013 17:47
If I recall correctly, the controls for the XBOX controller are related to the keys for keyboard play. There are no script commands to check for buttons pressed on the controller (at least not at glancing over the code), and I had assumed that it is only active when the "xbox=1" is found in the "setup.ini" file, activating the controller. So (by theory), if the controller is activated and the "button" relating to the function if you used a "key" on the keyboard is pressed, that function would run according.

With that being said, you could try it out. Script something that uses the normal "keypressed=x y" command and see if it responds the same with using the controller. If so, great. If not, then not so great as any chance to getting it addressed for a release is pretty nil.

I do not know if this will help. Based on my source, I have an image of the controller showing what button(s) do(es) what. (Point of reference- my source is v1.17 so if the image is incorrect, it is because it lines up with my source.)




There's no problem that can't be solved without applying a little scripting.
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 2nd Jul 2013 14:11 Edited at: 2nd Jul 2013 14:16
Thanks BlackFox, but it didn't worked..oh btw, I'm trying to find out a way to check if the player is moving/walking, basically I'm checking if his distance from an entity is changing using the $DIS varible:



The problem is that basically the plrrunning condition is true just if you press the shift button, even if you're not walking..so this script checks every 1 sec if the last saved player distance is not the same as the current: if so, when the player runs it enables the camfov stuff. I know I could have done that via "keypressed=x y", but I'd like it to work with the joystick..so I need to find a workaround! BUT IT DOESN'T WORK do you know another way?

Login to post a reply

Server time is: 2024-03-29 09:41:54
Your offset time is: 2024-03-29 09:41:54