Pages: 1
Topic closed
I think you just add
<when green flag clicked>
<forever>
<point towards( mouse pointer
<move( 5)steps> or something
<end>
Offline
<set{ Variable }to( <direction> )>
Offline
What's easier is using a forever block and putting [go to [mousepointer]] into it.
Offline
Jonathanpb wrote:
What's easier is using a forever block and putting [go to [mousepointer]] into it.
It depends on what the purpose is. To make it glide at a fixed pace, try this:
When Green Flag Clicked
forever
if <mouse down>
glide ((distance to [sprite]) / (10) secs to x ([x position] of [sprite]) y ([y position] of [sprite]).
Remember that the results are in one line; I just ran out of space.
Anyway, the sprite is to be always following the mouse pointer. Do what Jonathanpb said:
When Green Flag Clicked
forever
go to [mouse pointer]
For the sprite that is to move, give it that first script.
Hope that helped!
Offline
Ooh... good idea to put both ways.
That looks quite complicated since it's not in blocks... but it not actually complicated.
Last edited by Jonathanpb (2009-11-11 23:47:03)
Offline
on the sprite you want to move, make the script-
[When green flag pressed]
[forever:
[point towards [mouse]
[Take [5] steps]]
and it should slowly start moving toward the mouse once you press the green flag.
Offline
nikkiperson2 wrote:
on the sprite you want to move, make the script-
[When green flag pressed]
[forever:
[point towards [mouse]
[Take [5] steps]]
and it should slowly start moving toward the mouse once you press the green flag.
Like Mr_X said
Offline
Topic closed
Pages: 1