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

#1 2009-08-25 05:20:32

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

Point in Direction of Movement

I was just wondering if anyone could tell me a script which makes a sprite point in the direction it's moving without using 360 costumes (1 costume for every angle).

You can do this:[blocks]
<when green flag clicked>
<forever>
<if><key[ left arrow ]pressed?>
<turn cw( 15 )degrees>
<end>
<if><key[ right arrow ]pressed?>
<turn cw( 15 )degrees>
<end>
<end>

<when green flag clicked>
<forever if><key[ up arrow ]pressed?>
<move( 10 )steps>[/blocks]

But that's not what I mean, it's hard to explain, but basically, could I make it point towards the mouse pointer without using the [blocks]<point towards( mouse pointer[/blocks] block, while it was gliding towards the mouse pointer? I don't need it, I'm just interested.


Any help would be appreciated.

Thanks,
     WeirdF

Last edited by WeirdF (2009-08-25 06:02:04)


http://i.cr3ation.co.uk/dl/s1/gif/847032b8a331def77529b6a0384db1fe_handfingers.gif

Offline

 

Board footer