Discuss Scratch

letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Why is my joystick bugging
https://scratch.mit.edu/projects/584999331/editor/

Last edited by letmethinkforaminute (Oct. 16, 2021 23:24:40)

letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Bump
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.

Last edited by Thingied (Oct. 17, 2021 01:43:48)



Thingy
Thingied


Hi | Very Professional | What | Bad Grammar | Brain Dead | Hehe | 4+ Years on Scratch | Bye
im dum
















letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Thingied wrote:

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.
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
letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

letmethinkforaminute wrote:

Thingied wrote:

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.
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
Could you remix my thing with the changes you made
Thingied
Scratcher
1000+ posts

Joystick help it’s not working

letmethinkforaminute wrote:

Could you remix my thing with the changes you made
https://scratch.mit.edu/projects/585194335/


Thingy
Thingied


Hi | Very Professional | What | Bad Grammar | Brain Dead | Hehe | 4+ Years on Scratch | Bye
im dum
















letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Thingied wrote:

letmethinkforaminute wrote:

Could you remix my thing with the changes you made
https://scratch.mit.edu/projects/585194335/
Thanks I copied yours but for some reason my radius is stuck at 0 not 41
D-ScratchNinja
Scratcher
1000+ posts

Joystick help it’s not working

Do you want to use mine that I just made (here)?

D-ScratchNinja
- The following is my signature, which always shows up below my posts. -


Thumbnails glitching? Please give this sticky topic a read before discussing the issues.

How have the current limits of studios been? Good? Not great? What do you think they should be? Take my new poll if you want to share your opinions!

Scratch Database Work Update Do you know when I shared my projects?

OS: Windows 10 (20H2) / Browser: Microsoft Edge 96 (96.0.1054.34) / Updated this info Nov 25, 2021 (in PT)





I have a game jam! We're making time attack-themed games!

Like to record your game and watch others' replays? Try Replay Multiplayer!

I have a poll for studio users! You can pick and submit your preferences here.

My new official trading cards series! No worries, they're free!

Learn more about why it might take a while to update Scratch.
letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Thingied wrote:

letmethinkforaminute wrote:

Could you remix my thing with the changes you made
https://scratch.mit.edu/projects/585194335/
Can you point out where the code that changes radius is
Thingied
Scratcher
1000+ posts

Joystick help it’s not working

letmethinkforaminute wrote:

Thingied wrote:

letmethinkforaminute wrote:

Could you remix my thing with the changes you made
https://scratch.mit.edu/projects/585194335/
Can you point out where the code that changes radius is
(kind of a late response so hopefully this isn't a necropost)
If you scroll down to the bottom left you'll find a set radius block. Change the number in it to change the radius.


Thingy
Thingied


Hi | Very Professional | What | Bad Grammar | Brain Dead | Hehe | 4+ Years on Scratch | Bye
im dum
















letmethinkforaminute
Scratcher
100+ posts

Joystick help it’s not working

Thingied wrote:

letmethinkforaminute wrote:

Thingied wrote:

letmethinkforaminute wrote:

Could you remix my thing with the changes you made
https://scratch.mit.edu/projects/585194335/
Can you point out where the code that changes radius is
(kind of a late response so hopefully this isn't a necropost)
If you scroll down to the bottom left you'll find a set radius block. Change the number in it to change the radius.
That is a necropost but no worries as I’ve finished it and you didn’t know so you shouldn’t get in trouble

Powered by DjangoBB

Standard | Mobile