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

#26 2012-09-20 22:31:38

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Hmmm...

Basic drag 'n drop script:

when [sprite1 v] clicked
set [offset x v] to ((x position) - (mouse x))
set [offset y v] to ((y position) - (mouse y))
repeat until <not <mouse down?>>
go to x: ((mouse x) + (offset x)) y: ((mouse y) + (offset y))
end


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#27 2012-09-21 18:33:14

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Hmmm...

MoreGamesNow wrote:

Basic drag 'n drop script:

when [sprite1 v] clicked
set [offset x v] to ((x position) - (mouse x))
set [offset y v] to ((y position) - (mouse y))
repeat until <not <mouse down?>>
go to x: ((mouse x) + (offset x)) y: ((mouse y) + (offset y))
end

Will try, thanks.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

Board footer