Discuss Scratch
- Wettining
-
500+ posts
Xbox 360 Controller Support Mod?
bump
Last edited by Wettining (Dec. 31, 2016 00:39:05)
- johny5134
-
71 posts
Xbox 360 Controller Support Mod?
How exactly do you install this, please reply soon, I really look foward to this …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!
- Thepuzzlegame
-
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 loadedHow exactly do you install this, please reply soon, I really look foward to this …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!

- happyland440
-
1000+ posts
Xbox 360 Controller Support Mod?
Awesome! Does it work with DUALSHOCK controllers?
- bobbybee
-
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
-
100+ posts
Xbox 360 Controller Support Mod?
This is amazing! I'll use the extension in my game! 

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

- sonicthejoe
-
11 posts
Xbox 360 Controller Support Mod?
(Post removed)
Last edited by sonicthejoe (May 25, 2016 18:11:07)
- addius8
-
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 )
- lukefandlukel
-
4 posts
Xbox 360 Controller Support Mod?
But how do i get into the web console?Go into the web console and paste the code for the extension How does one import a JSON extension? I can only seem to import html ones using the Offline Editor.
- TheDragonMaster42
-
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!
Go into the web console and paste the code for the extension How does one import a JSON extension? I can only seem to import html ones using the Offline Editor.
How does one go into the web console?
- Benfun
-
16 posts
Xbox 360 Controller Support Mod?
Last edited by Benfun (April 7, 2018 09:50:29)
- jcgamer
-
29 posts
Xbox 360 Controller Support Mod?
Hmm, so what do you do after you put the code into the HTML console?
- Wettining
-
500+ posts
Xbox 360 Controller Support Mod?
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. Hmm, so what do you do after you put the code into the HTML console?
- thelegosensei
-
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:
I deem this one most important:
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
-
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
-
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
-
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.)