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

#1 2012-04-21 13:22:36

Sbijsoda
New Scratcher
Registered: 2012-04-21
Posts: 2

Help with sensing sprites?

Hello, I'm creating a game for a school project. I'm making a game where eventually you have to colonize a planet. However, before that I have a small Asteroid belt mission. In the asteroid belt you have to destroy asteroids for a period of time, while also evading them before you can land on the planet. However, my laser sensor seems to be not working. I thought I scripted it right for when it touches the meteors it would destroy them and hide, but the meteors seem immortal and almost none of them, if ever, get destroyed. If they do, it's either after 1 try or 10 tries before they blow up, and it needs to be after 1 try. I uploaded the game online so you could see what code I have (as I don't know how to input long strings of code into the forums) Here is the game link: http://scratch.mit.edu/projects/Sbijsoda/2485676

Offline

 

#2 2012-04-21 13:27:36

Sbijsoda
New Scratcher
Registered: 2012-04-21
Posts: 2

Re: Help with sensing sprites?

Alright, so I just tried playing it online and it works apparently perfectly fine, yet it doesn't work at all offline. Is there any connection between why it works online but not offline?

Offline

 

#3 2012-04-22 15:16:20

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

Re: Help with sensing sprites?

Sbijsoda wrote:

Alright, so I just tried playing it online and it works apparently perfectly fine, yet it doesn't work at all offline. Is there any connection between why it works online but not offline?

It's probably because the laser senses it's touching the asteroids first, hides, and then the test for touching takes place.

There are a couple of ways to avoid this:
--Have only the asteroids OR only the laser sense if they are touching each other.  Then, they broadcast a message to (if the asteroids are sensing) the laser or to the specific asteroid being touched.
--Have your laser not be the top layer, and simply have it switch to an all black costume and pause for a very short time (probably about 0.1 seconds) OR pause until the variable of the asteroid equals "off".


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

Offline

 

#4 2012-04-24 00:24:33

Jem12
Scratcher
Registered: 2012-04-20
Posts: 100+

Re: Help with sensing sprites?

Here's A game by Stevejobs2 That is in an asteroid field http://scratch.mit.edu/projects/SteveJo … Stevejobs2

cool


"In the begging the universe was created, this made a lot of people angry and was widly regarded as a bad move" ~  Douglas Adams ~ The resturant at the end of the universe

Offline

 

#5 2012-04-24 11:47:36

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: Help with sensing sprites?

I'm seeing it work perfectly fine. Try plaing it under a different program? (Some of my projects don't work unless I've logged on under my alternate username).


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

Board footer