This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-22 16:28:01

cmp8841
Scratcher
Registered: 2011-06-19
Posts: 31

X and Y scrolling affect struggling with me

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  smile

Offline

 

#2 2011-11-22 17:11:30

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: X and Y scrolling affect struggling with me

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.


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#3 2011-11-22 17:16:53

ProgrammingPro01
Scratcher
Registered: 2011-07-30
Posts: 1000+

Re: X and Y scrolling affect struggling with me

This belongs in All About Scratch. Reporting.  hmm


Bye 1.4!
http://www.reactiongifs.com/wp-content/uploads/2013/04/sobbing.gifhttp://25.media.tumblr.com/tumblr_mbfh6bIamQ1qky11ho1_500.png

Offline

 

#4 2011-11-22 17:21:46

maxdoss
Scratcher
Registered: 2010-07-27
Posts: 1000+

Re: X and Y scrolling affect struggling with me

ProgrammingPro01 wrote:

This belongs in All About Scratch. Reporting.  hmm

I don't think telling them that you reported helps.


It's my birthday. Deal with it.

Offline

 

#5 2011-11-22 17:22:52

Daroach1
Scratcher
Registered: 2011-09-11
Posts: 1000+

Re: X and Y scrolling affect struggling with me

I Was The First Reporter!!


http://i47.tinypic.com/v83mhl.png

Offline

 

#6 2011-11-22 17:51:45

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: X and Y scrolling affect struggling with me

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  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#7 2011-11-22 18:03:25

FallenIce
Scratcher
Registered: 2011-10-14
Posts: 100+

Re: X and Y scrolling affect struggling with me

Daroach1 wrote:

I Was The First Reporter!!

I don't think that matters....


http://i.imgur.com/Yc7aC.gif

Offline

 

#8 2011-11-22 20:41:06

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: X and Y scrolling affect struggling with me

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


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#9 2011-11-23 14:45:05

cmp8841
Scratcher
Registered: 2011-06-19
Posts: 31

Re: X and Y scrolling affect struggling with me

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  smile

Thanks thats exacly what I needed.  smile  Now, how do I end this conversation....?

Offline

 

#10 2011-11-23 14:47:30

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: X and Y scrolling affect struggling with me

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 helps  smile

Thanks thats exacly what I needed.  smile  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.  wink

Last edited by henley (2011-11-23 14:48:00)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#11 2011-11-23 16:24:10

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: X and Y scrolling affect struggling with me

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 helps  smile

Thanks thats exacly what I needed.  smile  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.  wink

And I got the report! Topic closed by request.  smile

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


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

Board footer