Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Joystick help it’s not working
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
Why is my joystick bugging
https://scratch.mit.edu/projects/584999331/editor/
https://scratch.mit.edu/projects/584999331/editor/
Last edited by letmethinkforaminute (Oct. 16, 2021 23:24:40)
- Thingied
- Scratcher
1000+ posts
Joystick help it’s not working
Some problems I found
1. The get direction custom block doesn't really work. Some things are wrong like the x and y sections being swapped, the +180 part being nested in the atan function and having it be x instead of y.
A little off topic but you can do Y < Y2 instead of subtracting.
Fixed version:
2. The collision script is a little glitchy, so here's how to fix it. Right now it's programmed to teleport to is inside the circle, which can be kind of hard to fix when it's based off the radius of a sprite. My fix is to just make a set radius and base it off of that.
3. The move script doesn't change the y for the object so just fix that and you're game is fixed :D.
1. The get direction custom block doesn't really work. Some things are wrong like the x and y sections being swapped, the +180 part being nested in the atan function and having it be x instead of y.
A little off topic but you can do Y < Y2 instead of subtracting.
Fixed version:
2. The collision script is a little glitchy, so here's how to fix it. Right now it's programmed to teleport to is inside the circle, which can be kind of hard to fix when it's based off the radius of a sprite. My fix is to just make a set radius and base it off of that.
3. The move script doesn't change the y for the object so just fix that and you're game is fixed :D.
Last edited by Thingied (Oct. 17, 2021 01:43:48)
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
Thanks but I can’t find my code for the collision part also does that fix the problem where if you have your finger somewhere it pings the joystick up or to the right Some problems I found
1. The get direction custom block doesn't really work. Some things are wrong like the x and y sections being swapped, the +180 part being nested in the atan function and having it be x instead of y.
A little off topic but you can do Y < Y2 instead of subtracting.
Fixed version:
2. The collision script is a little glitchy, so here's how to fix it. Right now it's programmed to teleport to is inside the circle, which can be kind of hard to fix when it's based off the radius of a sprite. My fix is to just make a set radius and base it off of that.
3. The move script doesn't change the y for the object so just fix that and you're game is fixed :D.
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
Could you remix my thing with the changes you madeThanks but I can’t find my code for the collision part also does that fix the problem where if you have your finger somewhere it pings the joystick up or to the right Some problems I found
1. The get direction custom block doesn't really work. Some things are wrong like the x and y sections being swapped, the +180 part being nested in the atan function and having it be x instead of y.
A little off topic but you can do Y < Y2 instead of subtracting.
Fixed version:
2. The collision script is a little glitchy, so here's how to fix it. Right now it's programmed to teleport to is inside the circle, which can be kind of hard to fix when it's based off the radius of a sprite. My fix is to just make a set radius and base it off of that.
3. The move script doesn't change the y for the object so just fix that and you're game is fixed :D.
- Thingied
- Scratcher
1000+ posts
Joystick help it’s not working
Could you remix my thing with the changes you made https://scratch.mit.edu/projects/585194335/
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
Thanks I copied yours but for some reason my radius is stuck at 0 not 41Could you remix my thing with the changes you made https://scratch.mit.edu/projects/585194335/
- D-ScratchNinja
- Scratcher
1000+ posts
Joystick help it’s not working
Do you want to use mine that I just made (here)?
D-ScratchNinja • he/him
- The following is my signature, which always shows up below my posts. -
New! Filter through my projects with my website.
Need to fix an issue? Check out this studio for solutions to some common problems!
OS: Windows 11 / Browser: Microsoft Edge / Time zone: PST/PDT
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
Can you point out where the code that changes radius isCould you remix my thing with the changes you made https://scratch.mit.edu/projects/585194335/
- Thingied
- Scratcher
1000+ posts
Joystick help it’s not working
(kind of a late response so hopefully this isn't a necropost)Can you point out where the code that changes radius isCould you remix my thing with the changes you made https://scratch.mit.edu/projects/585194335/
If you scroll down to the bottom left you'll find a set radius block. Change the number in it to change the radius.
- letmethinkforaminute
- Scratcher
100+ posts
Joystick help it’s not working
That is a necropost but no worries as I’ve finished it and you didn’t know so you shouldn’t get in trouble(kind of a late response so hopefully this isn't a necropost)Can you point out where the code that changes radius isCould you remix my thing with the changes you made https://scratch.mit.edu/projects/585194335/
If you scroll down to the bottom left you'll find a set radius block. Change the number in it to change the radius.
- gooey135
- Scratcher
59 posts
Joystick help it’s not working
I recently put in a joystick for my game but there is a problem. Its a parkour game, so you have to jump and collisions with objects are a thing. For anything that is in the joystick (My joystick is transparent) It has absolutely no collision, for walls and spikes alike. Whats going on?
- Discussion Forums
- » Help with Scripts
- » Joystick help it’s not working