Discuss Scratch

mewshrew12
Scratcher
43 posts

Turn around

I want my character sprite to turn around rather using the turn block than immediately change direction using the
point in direction block. I didn't use the actual blocks in this post because they confuse me.
deck26
Scratcher
1000+ posts

Turn around

Too little information. Sharing what you have would help. The answer will depend on the player's viewpoint for example.
Vicream_Creator
Scratcher
100+ posts

Turn around

mewshrew12 wrote:

I want my character sprite to turn around rather using the turn block than immediately change direction using the
point in direction block. I didn't use the actual blocks in this post because they confuse me.
All right you want to change the “Rotation Style” from circular to linear I guess?
Click on the little “i”, located at the top right of the sprite you wanna change the rotation style, and then you'll be able to change it
mewshrew12
Scratcher
43 posts

Turn around

deck26 wrote:

Too little information. Sharing what you have would help. The answer will depend on the player's viewpoint for example.
Sorry, My game is a top down RPG. When he changes direction, he immediately does it. I think this looks too unatural. Here, I'll share it. https://scratch.mit.edu/projects/262848261/ use WASD to move.
mewshrew12
Scratcher
43 posts

Turn around

Vicream_Creator wrote:

mewshrew12 wrote:

I want my character sprite to turn around rather using the turn block than immediately change direction using the
point in direction block. I didn't use the actual blocks in this post because they confuse me.
All right you want to change the “Rotation Style” from circular to linear I guess?
Click on the little “i”, located at the top right of the sprite you wanna change the rotation style, and then you'll be able to change it
The rotation style is already circular. I mean that I want my character to turn when changing directions rather than immediately changing.
ge-b
Scratcher
100+ posts

Turn around

Should the character turn at all? It's a top down RPG.
I think instead of turning and moving (x) steps, you could use
change x by (x)
change x by (-x)
change y by (x)
change y by (-x)
To move the character right, left, up and down, respectively, thereby also avoiding the turning smoothness problem.

(x) is just in place for any number.

Last edited by ge-b (Nov. 17, 2018 20:03:45)

mewshrew12
Scratcher
43 posts

Turn around

ge-b wrote:

Should the character turn at all? It's a top down RPG.
I think instead of turning and moving (x) steps, you could use
change x by (x)
change x by (-x)
change y by (x)
change y by (-x)
To move the character right, left, up and down, respectively, thereby also avoiding the turning smoothness problem.

(x) is just in place for any number.
Sorry, its a top down game, but enemies come from many different random directions and with the stiff movement it's hard to kill the enemies.
Awesome_Diamonds
Scratcher
17 posts

Turn around

mewshrew12 wrote:

ge-b wrote:

Should the character turn at all? It's a top down RPG.
I think instead of turning and moving (x) steps, you could use
change x by (x)
change x by (-x)
change y by (x)
change y by (-x)
To move the character right, left, up and down, respectively, thereby also avoiding the turning smoothness problem.

(x) is just in place for any number.
Sorry, its a top down game, but enemies come from many different random directions and with the stiff movement it's hard to kill the enemies.
I think that you might want something like this:
when [a] key pressed
repeat until <(direction) = [-90]>
turn ccw (15) degrees
wait (your choice) secs
end
mewshrew12
Scratcher
43 posts

Turn around

Awesome_Diamonds wrote:

mewshrew12 wrote:

ge-b wrote:

Should the character turn at all? It's a top down RPG.
I think instead of turning and moving (x) steps, you could use
change x by (x)
change x by (-x)
change y by (x)
change y by (-x)
To move the character right, left, up and down, respectively, thereby also avoiding the turning smoothness problem.

(x) is just in place for any number.
Sorry, its a top down game, but enemies come from many different random directions and with the stiff movement it's hard to kill the enemies.
I think that you might want something like this:
when [a] key pressed
repeat until <(direction) = [-90]>
turn ccw (15) degrees
wait (your choice) secs
end
Thank you, I'll try this out!
deck26
Scratcher
1000+ posts

Turn around

mewshrew12 wrote:

Awesome_Diamonds wrote:

mewshrew12 wrote:

ge-b wrote:

Should the character turn at all? It's a top down RPG.
I think instead of turning and moving (x) steps, you could use
change x by (x)
change x by (-x)
change y by (x)
change y by (-x)
To move the character right, left, up and down, respectively, thereby also avoiding the turning smoothness problem.

(x) is just in place for any number.
Sorry, its a top down game, but enemies come from many different random directions and with the stiff movement it's hard to kill the enemies.
I think that you might want something like this:
when [a] key pressed
repeat until <(direction) = [-90]>
turn ccw (15) degrees
wait (your choice) secs
end
Thank you, I'll try this out!
Only do that if your direction is always a multiple of 15 though or it will just loop forever!

You may also want to rotate clockwise or anti-clockwise depending on current and target directions.

https://scratch.mit.edu/projects/55006278/ may help - you may want it to turn faster but you can play with the numbers.

Powered by DjangoBB