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
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".
Offline
Here's A game by Stevejobs2 That is in an asteroid field http://scratch.mit.edu/projects/SteveJo … Stevejobs2
Offline
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).
Offline