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

#1 2012-01-08 22:49:47

tguile
New Scratcher
Registered: 2012-01-02
Posts: 10

How to have a sprite continue pointing

How do I have my gun barrel sprite continue pointing to the mouse but if the
direction is <15 or >90 not follow anymore? I got it to stop following when the
direction is <15 or >90 but it wont point to the mouse after. It just stays.
Any ideas? Yhanks.

Offline

 

#2 2012-01-09 08:52:36

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: How to have a sprite continue pointing

I'm trying to work it out... That's a really hard one there.


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#3 2012-01-09 09:04:32

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: How to have a sprite continue pointing

put "wait until_ mouse is in region" then it should start again


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#4 2012-01-09 09:29:09

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: How to have a sprite continue pointing

Borrego6165 wrote:

put "wait until_ mouse is in region" then it should start again

If only it were that simple.


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#5 2012-01-09 10:02:39

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Re: How to have a sprite continue pointing

Found it out!!! heres the link to a project with it. download it aand check out the script:
big_smile        http://scratch.mit.edu/projects/CatPerson/2263826


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 

#6 2012-01-09 14:53:50

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: How to have a sprite continue pointing

There are two ways I can think of to remedy this:  one is extremely simple:
http://img849.imageshack.us/img849/6850/script.gif
This one may seem like it would glitch up but it really doesn't.  However I love things being a bit more complex than this, give me a second to write up a really perfect one.

This one functions exactly the same, except it doesn't flash in the small offline viewer.
http://img831.imageshack.us/img831/6850/script.gif

Last edited by Kileymeister (2012-01-09 15:03:43)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#7 2012-01-09 15:26:44

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: How to have a sprite continue pointing

Kileymeister wrote:

There are two ways I can think of to remedy this:  one is extremely simple:
http://img849.imageshack.us/img849/6850/script.gif
This one may seem like it would glitch up but it really doesn't.  However I love things being a bit more complex than this, give me a second to write up a really perfect one.

This one functions exactly the same, except it doesn't flash in the small offline viewer.
http://img831.imageshack.us/img831/6850/script.gif

The first one, I kept trying to get it working..


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#8 2012-01-09 15:53:56

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: How to have a sprite continue pointing

rabbit1131 wrote:

Kileymeister wrote:

There are two ways I can think of to remedy this:  one is extremely simple:
http://img849.imageshack.us/img849/6850/script.gif
This one may seem like it would glitch up but it really doesn't.  However I love things being a bit more complex than this, give me a second to write up a really perfect one.

This one functions exactly the same, except it doesn't flash in the small offline viewer.
http://img831.imageshack.us/img831/6850/script.gif

The first one, I kept trying to get it working..

It didn't work for you?  I honestly can't find anything wrong with it, considering it's simplicity.

And no, normal sized offline mode is designed to show all graphical "tricks", that can't be helped.  Check it online or in presentation mode.

Last edited by Kileymeister (2012-01-09 15:57:52)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer