If I want a character to move in a circle, ie - they follow the path of an invisible circle, how would I do it? I know you can manually do
[blocks]
<go to x 0)y
1)>
<go to x 0)y
2)>
[/blocks]
Or something like that, but ideally, there would be an easier way. Is there? And if there is could you tell me it?
Thanks so much.
Offline
Try [Change X by <sine of 1>] and [Change Y by <Cosine of 1>] in a repeat by 360 block.
Offline
For a simpler method, try something like:
point in direction ( 0 ) repeat ( 360 ) Turn ( 1 ) degrees [you can use either direction] Move ( 1 ) steps [change the number to make a bigger/smaller circle]
If you want the sprite to face the same way the whole time, just click the square in the Sprite Header Pane, which will make the sprite look as if it is facing 90 degrees the whole time, without affecting (effecting? I'm not sure ) the script.
Offline
Wolfie1996 wrote:
For a simpler method, try something like:
Code:
point in direction ( 0 ) repeat ( 360 ) Turn ( 1 ) degrees [you can use either direction] Move ( 1 ) steps [change the number to make a bigger/smaller circle]If you want the sprite to face the same way the whole time, just click the square in the Sprite Header Pane, which will make the sprite look as if it is facing 90 degrees the whole time, without affecting (effecting? I'm not sure
) the script.
Yeah, it's "affecting." (Affect is a verb and effect is a noun)
But... on topic:
I recommend using Wolfie's method, especially if you aren't too familiar with trig. The only time I can think of that you should use the trig method is if the spite might hit the edges because with the rotation method, hitting the edge totally mess up the path.
Offline