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

#1 2010-05-21 21:17:41

poppypaynterscratch
Scratcher
Registered: 2009-09-20
Posts: 100+

need help in squeak

could someone help me find the x pos or y pos of a sprite without the other? i need it for a block im making for someone.... ive found 'self referencePosition', and im not sure how to make that work... cause i just need the x and y positions seperately... please help


http://i33.tinypic.com/2dw6hxv.gif

Offline

 

#2 2010-05-21 21:24:22

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: need help in squeak

poppypaynterscratch wrote:

could someone help me find the x pos or y pos of a sprite without the other? i need it for a block im making for someone.... ive found 'self referencePosition', and im not sure how to make that work... cause i just need the x and y positions seperately... please help

I don't know Smalltalk at all (I'm trying to teach myself it though  smile  ) but I guess you could look for the method for the [set x to ()] and [set y to ()] blocks. Then you could work off of that.

Last edited by ScratchReallyROCKS (2010-05-21 21:24:39)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#3 2010-05-21 22:28:17

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: need help in squeak

self referencePosition x or self referencePosition y


nXIII

Offline

 

#4 2010-05-22 14:00:44

poppypaynterscratch
Scratcher
Registered: 2009-09-20
Posts: 100+

Re: need help in squeak

ScratchReallyROCKS wrote:

poppypaynterscratch wrote:

could someone help me find the x pos or y pos of a sprite without the other? i need it for a block im making for someone.... ive found 'self referencePosition', and im not sure how to make that work... cause i just need the x and y positions seperately... please help

I don't know Smalltalk at all (I'm trying to teach myself it though  smile  ) but I guess you could look for the method for the [set x to ()] and [set y to ()] blocks. Then you could work off of that.

already looked, only has it for both coordinates


http://i33.tinypic.com/2dw6hxv.gif

Offline

 

#5 2010-05-22 14:01:58

poppypaynterscratch
Scratcher
Registered: 2009-09-20
Posts: 100+

Re: need help in squeak

nXIII wrote:

self referencePosition x or self referencePosition y

thank you! now i have all that i need for a requested block!
(distance to X sad ) Y sad ) )! lol its easy


http://i33.tinypic.com/2dw6hxv.gif

Offline

 

Board footer