Discuss Scratch
- Wettining
-
Scratcher
500+ posts
Xbox 360 Controller Support Mod?
bump
Last edited by Wettining (Dec. 31, 2016 00:39:05)
- johny5134
-
Scratcher
71 posts
Xbox 360 Controller Support Mod?
…and done!How exactly do you install this, please reply soon, I really look foward to this
https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js
Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!
The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Have fun!
- Thepuzzlegame
-
Scratcher
1000+ posts
Xbox 360 Controller Support Mod?
Go into the editor, open up the browser console and paste this code in and press enter. Then check the More Blocks section and the blocks should be loaded…and done!How exactly do you install this, please reply soon, I really look foward to this
https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js
Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!
The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Have fun!

- happyland440
-
Scratcher
1000+ posts
Xbox 360 Controller Support Mod?
Awesome! Does it work with DUALSHOCK controllers?
- bobbybee
-
Scratcher
1000+ posts
Xbox 360 Controller Support Mod?
Awesome! Does it work with DUALSHOCK controllers?
No idea. Feel free to try it, though.
EDIT: I think so.
Last edited by bobbybee (Feb. 23, 2016 22:28:19)
- DonnyCraft
-
Scratcher
100+ posts
Xbox 360 Controller Support Mod?
This is amazing! I'll use the extension in my game! 

- bobbybee
-
Scratcher
1000+ posts
Xbox 360 Controller Support Mod?
This is amazing! I'll use the extension in my game!
Your welcome

- sonicthejoe
-
Scratcher
11 posts
Xbox 360 Controller Support Mod?
(Post removed)
Last edited by sonicthejoe (May 25, 2016 18:11:07)
- addius8
-
New Scratcher
2 posts
Xbox 360 Controller Support Mod?
…and done!
https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js
Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!
The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Have fun!
Hey there ! Your mod is very very useful, but nearly every controller uses the left and right top “buttons” (you named them left and right bottom) as “force” buttons. Usually you can control speed or anything like this with force.
Could you add this feature to the mod? Everyone here would apprechiate this very much . So we can use these control buttons as force buttons like the joystick force function ))
Thank you very much )
- KEL5isGod
-
Scratcher
27 posts
Xbox 360 Controller Support Mod?
GIANT BUMP!
Suggestions:
Suggestions:
when [controllers connected v] > (2)
when [controllers on v] > (2)
rumble controller [1 v] for (...) seconds
(is controller [1 v] a [xbox one v] controller?)
(is controller [2 v] a [xbox 360 v] controller?)
(is controller [3 v] a [ps3 v] controller?)
(is controller [4 v] a [ps4 v] controller?)
(is controller [5 v] a [other console v] controller?)
(does controller [1 v] use [xInput v]?)
(does controller [2 v] use [directinput v]?)
<dpad button [up v] pressed on controller [1 v]? >
- lukefandlukel
-
Scratcher
4 posts
Xbox 360 Controller Support Mod?
But how do i get into the web console?How does one import a JSON extension? I can only seem to import html ones using the Offline Editor.Go into the web console and paste the code for the extension
- TheDragonMaster42
-
Scratcher
4 posts
Xbox 360 Controller Support Mod?
…and done!
https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js
Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!
The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Have fun!
How does one import a JSON extension? I can only seem to import html ones using the Offline Editor.Go into the web console and paste the code for the extension
How does one go into the web console?
- Benfun
-
Scratcher
16 posts
Xbox 360 Controller Support Mod?
Last edited by Benfun (April 7, 2018 09:50:29)
- jcgamer
-
Scratcher
29 posts
Xbox 360 Controller Support Mod?
Hmm, so what do you do after you put the code into the HTML console?
- Wettining
-
Scratcher
500+ posts
Xbox 360 Controller Support Mod?
Hmm, so what do you do after you put the code into the HTML console?After you put it into the Javascript console the blocks should show up in the “More Blocks” category and you should be able to connect a controller to your computer to use it.
- thelegosensei
-
Scratcher
21 posts
Xbox 360 Controller Support Mod?
it's cool, but the way it's coded makes it a bit hard to implement into a scratch game.
I would do it like this:
if it gets reimplemented like I showed above, then it would blow Joy2Key out of the water.
I would do it like this:
([Xinput1 v] [Left v] stick [X v]:: #00a200)I deem this one most important:
<[Xinput1 v] [A v] pressed?:: #00a200>
<[Xinput1 v] connected?:: #00a200>
([Xinput1 v] [Left v] stick [X v]:: #00a200)I tried to make a little dot move around in circles with the joystick, but ultimately couldn't due to how the directional thing works. I couldn't create a diagonal axis using two axis, because it's locked on direction and force. great plugin, but I can't really use it without this ability.
if it gets reimplemented like I showed above, then it would blow Joy2Key out of the water.
Last edited by thelegosensei (July 10, 2018 00:04:28)
- SeeminglyOkay
-
Scratcher
77 posts
Xbox 360 Controller Support Mod?
I know you want it to be built into Scratch as a block, but wouldn't it be better to use an external program to map XInput to Keyboard?
- thelegosensei
-
Scratcher
21 posts
Xbox 360 Controller Support Mod?
I know you want it to be built into Scratch as a block, but wouldn't it be better to use an external program to map XInput to Keyboard?
the reason I want it is analog controls is the ability to tilt the joystick slightly or fully, in any analogue direction. and that can't be replicated with the keyboard.
getting exact numbers from the controller is really the best in many cases.
Last edited by thelegosensei (July 10, 2018 18:40:55)
- bobbybee
-
Scratcher
1000+ posts
Xbox 360 Controller Support Mod?
I tried to make a little dot move around in circles with the joystick, but ultimately couldn't due to how the directional thing works. I couldn't create a diagonal axis using two axis, because it's locked on direction and force. great plugin, but I can't really use it without this ability.
You can compute the components in Scratch as:
X = Force * cos of Direction
Y = Force * sin of Direction
Hope this helps

(The blocks for cos/sin are in Operators, if you haven't used them.)


