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

#1 2010-07-03 09:02:14

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

I need help with moving stuff.

I have this platform gme. I want my sprite to follow mouse, but no just go to it. Like gliding. But when it glides, it doesn't work cos if i put my mouse somewhere and move it, it goes there first.

Offline

 

#2 2010-07-03 09:35:21

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: I need help with moving stuff.

Could you explain a bit more, with a project/some of the code?

BTW the

[blocks]<glide(  )secs to x sad   )y sad  [/blocks]

Is [removed]. Don't use it. I can't give any more advice until you show the project.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#3 2010-07-03 09:41:32

Greentabby55
Scratcher
Registered: 2010-05-04
Posts: 50

Re: I need help with moving stuff.

juststickman wrote:

Could you explain a bit more, with a project/some of the code?

BTW the

[blocks]<glide(  )secs to x sad   )y sad  [/blocks]

Is [removed]. Don't use it. I can't give any more advice until you show the project.

Actually, I just tried it out.

<forever>
   <glide( 0.1 )secs to x sad  <mouse x> )y sad  <mouse y>
<end>

It works pretty good.

Offline

 

#4 2010-07-03 09:44:41

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: I need help with moving stuff.

Greentabby55 wrote:

juststickman wrote:

Could you explain a bit more, with a project/some of the code?

BTW the

[blocks]<glide(  )secs to x sad   )y sad  [/blocks]

Is [removed]. Don't use it. I can't give any more advice until you show the project.

Actually, I just tried it out.

<forever>
   <glide( 0.1 )secs to x sad  <mouse x> )y sad  <mouse y>
<end>

It works pretty good.

Sure it's slightly eased, but it's just better to
[blocks]
<forever>
<point towards( mouse pointer
<move( (( <distance to[ mouse pointer </> [insert number here] )) )steps>
<end>
[/blocks]
It's smoother, just change the [insert number here] to a number, higher if you want it to take longer.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#5 2010-07-03 09:52:11

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

Re: I need help with moving stuff.

Greentabbys works. But I found it out before. view my game at:

http://scratch.mit.edu/projects/Gveradux/1169145

Offline

 

#6 2010-07-03 10:02:57

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Re: I need help with moving stuff.

When GREENFLAG clicked
Forever
Point towards mouse
Move 4 steps

Offline

 

Board footer