I know the X stuff and the Y stuff where you go
<when green flag clicked>
<forever>
<set{ <x position> }to( (( 480 <+> (( ScrollX <*> 0 )) ))
<set{ <y position> }to( (( 360 <+> (( ScrollY <*> 0 )) ))
The thing I need help is (only if its possible to do this) when you have a spaceship, and the only thing you do is change the angle, (left and right) how do you get the angle direction determine how much it changes X or Y by? like if the spaceship is going 33 degrees, how do I get that to affect the ScrollX and ScrollY positions of the backround sprites? Ive been trying for many hour, and cant figure it out. Someone please reply. It'd be nice also if Lightnin* would reply too, because he seems to know allot/everything about scratch. It makes me think he might even be the founder of scratch. I dont know.
But anyways, if anyone knows, please help me.
P.S. this might be the second one out there of this exacle post, but I 'm preety sure I accidentally deleted my first one on accident, so its a good thing I always copie my messages before posting them
Offline
This needs to be moved to All About Scratch, or maybe Advanced Topics.
However, I do know that this requires trigonometry, but I don't know how to use trig.
Offline
This belongs in All About Scratch. Reporting.
Offline
Yes, trigonometry is a good way to get what you are looking for. If you want to move a sprite 25 steps away from the current location moving at an angle of 52 degrees, the equations you want are
Change in X = 25 * Sin(52)
Change in Y = 25 * Cos(52)
Hope that helps
Offline
XD
Lightnin (no asterisk needed) is a part of the Scratch Team at MIT. A group of people who created/are creating Scratch. But there are people who can match/surpass the scripting ability of the Scratch Team. Example: Archmage
Some people almost surpass/match the SmallTalk programming ability. Squeak SmallTalk is the programming language that was used to make Scratch. The Scratch Team obviously has to know it. And some people (such as my self) like to tweak, or modify Scratch by a special system of "hacking". But Scratch has to be open source, so it's only legal. Anyways, a user my the name of "nXIII" has done really well in modifying Scratch, and made a very successful "mod" called Panther and distributed it, and now he's reworking Scratch completely. I'd be willing to say that he is almost, if not just as good as the Scratch team.
Offline
Paddle2See wrote:
Yes, trigonometry is a good way to get what you are looking for. If you want to move a sprite 25 steps away from the current location moving at an angle of 52 degrees, the equations you want are
Change in X = 25 * Sin(52)
Change in Y = 25 * Cos(52)
Hope that helps
Thanks thats exacly what I needed. Now, how do I end this conversation....?
Offline
cmp8841 wrote:
Paddle2See wrote:
Yes, trigonometry is a good way to get what you are looking for. If you want to move a sprite 25 steps away from the current location moving at an angle of 52 degrees, the equations you want are
Change in X = 25 * Sin(52)
Change in Y = 25 * Cos(52)
Hope that helpsThanks thats exacly what I needed. Now, how do I end this conversation....?
Click the grey "report" button at the bottom of the first post, and then when it asks you why, say "Topic Resolved".
The Scratch Team/a moderator gets the report later and comes to the topic to close it.
But I'll go ahead and report it for you.
Last edited by henley (2011-11-23 14:48:00)
Offline
henley wrote:
cmp8841 wrote:
Paddle2See wrote:
Yes, trigonometry is a good way to get what you are looking for. If you want to move a sprite 25 steps away from the current location moving at an angle of 52 degrees, the equations you want are
Change in X = 25 * Sin(52)
Change in Y = 25 * Cos(52)
Hope that helpsThanks thats exacly what I needed. Now, how do I end this conversation....?
Click the grey "report" button at the bottom of the first post, and then when it asks you why, say "Topic Resolved".
The Scratch Team/a moderator gets the report later and comes to the topic to close it.
But I'll go ahead and report it for you.
And I got the report! Topic closed by request.
If you need to have the topic reopened for whatever reason, just hit the report button again, and a Scratch Team member or moderator will reopen the topic for you.
Offline