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

#1 2009-04-08 13:13:48

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Offering help with scratch

Hi there

I've been on scratch for a while and I consider myself to be pretty decent with scratch so I can offer help with programming if you need it. I can also answer questions that are too difficult for most other scratch users because I understand the program better.

So ask away but understand that scratch is limited so that there may be things that are impossible for scratch.

Last edited by archmage (2009-04-08 13:25:07)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#2 2009-04-08 13:25:20

DrMath
Scratcher
Registered: 2009-02-27
Posts: 100+

Re: Offering help with scratch

How do you find the x and y position of a SPRITE1 relative to SPRITE2?

Do you subtract the x position of SPRITE1 with the x position of SPRITE2, or the other way around or what?

Offline

 

#3 2009-04-08 13:33:43

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Offering help with scratch

You are not being clear. Do you want to find the distance between the 2 sprites?

if that is the case then just do this

difference in x=sprite1x-sprite2x

Same idea with y


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2009-04-08 13:53:19

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Offering help with scratch

or you could do


<if><( x position of sprite 1 <>>x position of sprite 2  )>
(( sprite 1 x <->  sprite 2 x))
<else>
((sprite 2 x  <-> sprite 1 x ))

same with y


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#5 2009-04-08 13:54:22

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Offering help with scratch

Thats pretty much the same thing as what I posted.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2009-04-08 15:11:00

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: Offering help with scratch

bosox397 wrote:

or you could do


<if><( x position of sprite 1 <>>x position of sprite 2  )>
(( sprite 1 x <->  sprite 2 x))
<else>
((sprite 2 x  <-> sprite 1 x ))

same with y

I don't think you need the If, Else.
Can't you just do Abs (X position Of Sprite 1) - (X Position of Sprite 2) ?

Offline

 

#7 2009-04-08 15:17:17

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Offering help with scratch

Actually you should not have the ifs at all and just put what I posted. Bosox's code will make you always move forward. If you want only positive values it is eaier to use the abs function.

Last edited by archmage (2009-04-08 15:18:50)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#8 2009-04-08 19:15:15

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Offering help with scratch

Oh well I didn't know what he wanted. If I was actually programming I could have figured it out especially since we just did absolute value like 5 months ago.  smile


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#9 2009-04-09 13:23:54

adityasm9
Scratcher
Registered: 2008-03-12
Posts: 100+

Re: Offering help with scratch

nice idea opening this thread archmage!

Offline

 

Board footer