Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scripts not working? :(
- NataLatte
- Scratcher
3 posts
Scripts not working? :(
Hey guys, so I made this project ( http://scratch.mit.edu/projects/14771746/#editor ) and in the project there is a pillow sprite (Sprite40) you can get from a store. Once you go to your home and select it from your items, a broadcast is sent out (SHOWpillow) and a variable is set to 1 (pillowS). So the problem is, there are a couple scripts that are-
“other” being a place other than “home” or “shop”. (these are already values of the variable) But the thing is, these scripts don't work for some reason. They're glowing, so they should be working. I don't know why they're not. It's probably some stupid reason, so forgive me >^<' Also while you're checking it out if you can, feel free to play my game so far XD
Thanks~
when green flag clicked
forever
if <(place) = [other]> then
hide
end
end
“other” being a place other than “home” or “shop”. (these are already values of the variable) But the thing is, these scripts don't work for some reason. They're glowing, so they should be working. I don't know why they're not. It's probably some stupid reason, so forgive me >^<' Also while you're checking it out if you can, feel free to play my game so far XD
Thanks~
Last edited by NataLatte (Dec. 24, 2013 22:03:54)
- AonymousGuy
- Scratcher
1000+ posts
Scripts not working? :(
Oh, I think there is some kind of bug with the “hide” block…
You could try just setting its ghost effect to 100, except that is not the same as hiding, because it can still be detected by other sprites…. Hmmm…..
You could try just setting its ghost effect to 100, except that is not the same as hiding, because it can still be detected by other sprites…. Hmmm…..
- JAVAProgramming
- Scratcher
100+ posts
Scripts not working? :(
http://scratch.mit.edu/projects/14771746/#editor ) and in the project there is a pillow sprite (Sprite40) you can get from a store. Once you go to your home and select it from your items, a broadcast is sent out (SHOWpillow) and a variable is set to 1 (pillowS). So the problem is, there are a couple scripts that are-Do you mean it's not showing up, or not hiding? Hey guys, so I made this project (when green flag clicked
forever
if <(place) = [other]> then
hide
end
end
“other” being a place other than “home” or “shop”. (these are already values of the variable) But the thing is, these scripts don't work for some reason. They're glowing, so they should be working. I don't know why they're not. It's probably some stupid reason, so forgive me >^<' Also while you're checking it out if you can, feel free to play my game so far XD
Thanks~
My Newest Project, Come Check It Out
Dots, On Scratch
Want to change the way we count? The Dozenal System.
“The story so far:
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.”
― Douglas Adams, The Restaurant at the End of the Universe
- scubajerry
- Scratcher
1000+ posts
Scripts not working? :(
You need to remove the FOREVER loops out of your sprite40 WHEN I RECEIVE SHOWPillow.
- Failord
- Scratcher
1000+ posts
Scripts not working? :(
I think the computer might not know what “other” means. To it, “other” is just a string of letters.
You need to script it more like this:
Hope this helped! You might also want to make it so when the place isn't set to “home” or “shop,” it sets it to “other.”
You need to script it more like this:
<not <(place) = [home]>>
Hope this helped! You might also want to make it so when the place isn't set to “home” or “shop,” it sets it to “other.”
Thanks for the ride, Scratch Team and community! Unfortunately, the time has come for me to move on from Scratch, so I'll no longer be using the forums. Thanks again, and farewell!
Invisible text! This will show you if a profile I claim to be mine IS mine. Just remember to visit the profile and see if I confirmed in the comments.
For old time's sake, see the revolutionary Laser Battle 2.0! Also see Unstoppable Game!
And no, the evil kumquats didn't alter my signature…
- NataLatte
- Scratcher
3 posts
Scripts not working? :(
I think the computer might not know what “other” means. To it, “other” is just a string of letters.
You need to script it more like this:<not <(place) = [home]>>
Hope this helped! You might also want to make it so when the place isn't set to “home” or “shop,” it sets it to “other.”
Oh yeah, I understand that. Other is just a value of the variable. Although maybe you're right that the computer doesn't understand it. I'll try that out! Thanks for your help
- samse
- New to Scratch
1 post
Scripts not working? :(
Interesting to see … thank you it's well done mögel
- scubajerry
- Scratcher
1000+ posts
Scripts not working? :(
You need to remove the FOREVER loops out of your sprite40 WHEN I RECEIVE SHOWPillow.
- NataLatte
- Scratcher
3 posts
Scripts not working? :(
You need to remove the FOREVER loops out of your sprite40 WHEN I RECEIVE SHOWPillow.
Thanks for your help! I solved it ~ turns out I didn't need to completely remove it, but I did need to move them around a bit. Still, thanks for letting me know that I needed to mess around with them. Happy holidays btw~!
- Discussion Forums
- » Help with Scripts
- » Scripts not working? :(