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

#1 2010-08-06 11:33:17

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Point in Opposite Directon?

Has anyone heard of Osmos? I'm trying to make Osmos style moving (as an experiment), but point towards mouse pointed * -1 doesn't really work. Anyone know how to make it point in the true opposite direction?

Edit: Uploaded it as a project so you can see what I mean by 'not working'. Here's the link:
http://scratch.mit.edu/projects/Sunrise-Moon/1232444

Last edited by Sunrise-Moon (2010-08-06 11:57:02)


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#2 2010-08-06 11:53:37

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Point in Opposite Directon?

How does it not really work?


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#3 2010-08-06 11:56:31

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Point in Opposite Directon?

Blade-Edge wrote:

How does it not really work?

It points in the opposite direction, but not on the y axis I think. Here, I just uploaded it so you can see what I mean:
http://scratch.mit.edu/projects/Sunrise-Moon/1232444
I'm sure it's working the way it should, but it's not what I'm trying to do.

Last edited by Sunrise-Moon (2010-08-06 11:57:41)


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#4 2010-08-06 11:58:32

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Point in Opposite Directon?

You could try this:

[blocks] <point in direction( (( <direction> <-> 180 ))[/blocks]

Does that work?


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#5 2010-08-06 12:00:36

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Point in Opposite Directon?

Wolfie1996 wrote:

You could try this:

[blocks] <point in direction( (( <direction> <-> 180 ))[/blocks]

Does that work?

That works perfectly! Thank you!


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#6 2010-08-06 19:04:59

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Point in Opposite Directon?

Or you could use [turn (180) degrees].  tongue


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#7 2010-08-06 19:06:09

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Point in Opposite Directon?

Jonathanpb wrote:

Or you could use [turn (180) degrees].  tongue

Wouldn't that just make it spin uncontrollably?


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#8 2010-08-06 19:11:47

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Point in Opposite Directon?

Blade-Edge wrote:

Jonathanpb wrote:

Or you could use [turn (180) degrees].  tongue

Wouldn't that just make it spin uncontrollably?

It flips the sprite. Of course, just like the other method, continuously doing that would make the sprite flip uncontrollably.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#9 2010-08-06 19:19:30

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Point in Opposite Directon?

Just have it point towards whatever it is and move -1 steps. Or you could have a seperate sprite that points towards whatever it is and then your sprite goes in that direction - 180.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#10 2010-08-06 20:47:24

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Point in Opposite Directon?

Or you could just flip the costume in the sprite editor and have it move -1 steps  smile

Offline

 

Board footer