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)
Offline
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
Offline
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
Offline
Thats pretty much the same thing as what I posted.
Offline
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
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)
Offline
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.
Offline
nice idea opening this thread archmage!
Offline