Hi,
I have a project that needs the "score" variable to go to a certain place other than the top left corner... Is there a way to do this?
Regards,
CAA14
Offline
You can't move variables around with scripts. Within Scratch, you have to drag the variables to the correct locations, and then save the project with variables shown. When you upload to the website, they'll be where you put them.
Offline
Well, when ever i restart scratch, it rearranges my sprites, and resets my variable locations... Not only that, but it also causes some of my perfectly good scripts not to work... should i reinstall? Or post it as a beta and see if it works here?
Thanks for responding,
Regards,
CAA14
Offline
Make sure that your variables are all shown (the checkboxes are marked in the Variables palette) when you save the project. Otherwise, they'll move to the top-left corner.
What do you mean by "rearranges my sprites"?
About scripts not working... I'm not sure what that could be. I've never run into that problem before.
Offline
Hi,
What i mean by "scripts rearranging" is that in the sprite selection menu(Bottom Right), each time i reopen scratch and my project, they are in a different order.
I'm glad you've never had that problem... It's very frustrating.
Thanks again,
Regards,
CAA14
Offline
Hi,
I would like to upload a beta of my 1st project, nut before i do i need to know if i can change it's name after i upload it. If i can, i sure will.
Regards,
CAA14
Offline
CAA14 wrote:
Hi,
What i mean by "scripts rearranging" is that in the sprite selection menu(Bottom Right), each time i reopen scratch and my project, they are in a different order.
I'm glad you've never had that problem... It's very frustrating.
Thanks again,
Regards,
CAA14
Well if you're scripts aren't working, then it might be a problem with the code itself. Could you post your code or your project?
Also, you might be interested to here this, but in Scratch 2.0, there'll be a new block that'll let you move variables wherever you want.
Now, as for your sprites being re-positioned, this shouldn't be happening. Re-installing Scratch might help, though I'm not 100% sure as I've never heard of this before, and it's never occurred to me. If that fails, then you could always put a [go to x: () y: ()] block in each sprite to move it to its correct position at the beginning of each project run.
Last edited by ErnieParke (2013-01-20 14:00:38)
Offline
CAA14 wrote:
Hi,
I would like to upload a beta of my 1st project, nut before i do i need to know if i can change it's name after i upload it. If i can, i sure will.
Regards,
CAA14
Yes, you can, but you first have to upload with the same name as it originally had. Then, after you've uploaded, you can click on the project's name and change it from there.
Offline
Hi,
Thanks again, Ernie.
There are certain scripts that i know are working that will randomly not work, with nothing changed from when they did work.
Also, i had to do the go to thing.
And, what i really meant by "rearranging my sprites" was that the menu in the bottom right would rearrange my sprites, the menu that shows you all the sprites you have in your project.
Regards,
CAA14
Offline
CAA14 wrote:
Hi,
Thanks again, Ernie.
There are certain scripts that i know are working that will randomly not work, with nothing changed from when they did work.
Also, i had to do the go to thing.
And, what i really meant by "rearranging my sprites" was that the menu in the bottom right would rearrange my sprites, the menu that shows you all the sprites you have in your project.
Regards,
CAA14
Ahhh... My complete mistake. Somehow when I was typing up my post, that wormed its my way into my head, but either way, this still shouldn't be happening.
Now about the scripts that randomly won't work, well most likely those scripts includes multiple variables, and conditionals, all of which can give different results if you've changed any scripts recently. That's why I'm asking to see your scripts, to make sure something along these lines didn't occur, unless you've changed absolutely nothing in these past few days, in which case then it's probably not a problem with your scripts, though it's always nice to double check.
Last edited by ErnieParke (2013-01-20 14:15:29)
Offline
Hi,
I just posted a beta version.
Search, "Target Practice (Beta)" and you should find it.
Please help if you can.
Regards,
CAA14
Offline
I really, really, really want to know what's wrong with my scripts.
It's driving me nuts.
I just want this project to work and be over so i can move on.
Regards,
CAA14
Offline
CAA14 wrote:
Hi,
I just posted a beta version.
Search, "Target Practice (Beta)" and you should find it.
Please help if you can.
Regards,
CAA14
Well three things:
1). This is just a tip; if you ever don't want to use Scratch's built in varibale viewer, you could always make your own. Just ask if you'd like to hear more.
2). Aren't the targets supposed to hide whenever you shoot them?
3). In your Crosshair sprite, you have several scripts that look like this:
when gf clicked forever if <(color [#000000] is touching [Color...]?) and (mouse down?)> change [score v] by ((score) + (orange points)) wait (1) secs
when gf clicked forever if <(color [#000000] is touching [Color...]?) and (mouse down?)> change [score v] by (orange points)//So score won't double. wait (1) secs//Optional addition of a "reload". wait until <not (mouse down?)>//More realistic.
Last edited by ErnieParke (2013-01-20 14:47:27)
Offline
Hi,
Thank you! I can't believe i did not see the doubling thing, how stupid!
Okay, the other problems are that the "block" sprite and "multiplier" sprite are supposed to disappear when "level_End?" is "yes", but the multiplier does not.
Thank you so much, and sorry about the bone headed scripts.
Regards,
CAA14
Offline
Also, The block is not covering all targets.
Regards,
CAA14
Offline
and, once i get this project finished, I'd love to hear how to make my own variable viewer.
CAA14
P.S. Over all, how was my first project?
Offline
CAA14 wrote:
Hi,
Thank you! I can't believe i did not see the doubling thing, how stupid!
Okay, the other problems are that the "block" sprite and "multiplier" sprite are supposed to disappear when "level_End?" is "yes", but the multiplier does not.
Thank you so much, and sorry about the bone headed scripts.
Regards,
CAA14
Well it's okay; I was just like this when I started out with Scratch.
Anyway, the reason why your multiplier isn't stopping/hiding whenever a level finishes is because when it enters its loop to fly around, nothing is making it get out of that loop when the level finishes, and nothing is preventing it from showing when it shouldn't. So, instead, you could try turning the show blocks into this:
if <(level_End?) = [yes]> hide stop script else show end
when I receive [level1_Start v] if <(level_End?) = [yes]> stop script else repeat (times_to_fly) Script... end end
when I receive [level1_Start v] repeat (times_to_fly) if <(level_End?) = [yes]> stop script else Script... end end
Last edited by ErnieParke (2013-01-20 15:10:22)
Offline
CAA14 wrote:
Also, The block is not covering all targets.
Regards,
CAA14
This should be an easy one to fix; so what you could do is first, implement a script like this:
when gf clicked broadcast [layer1 v] and wait broadcast [layer2 v] and wait broadcast [layer3 v] and wait More, if you want...
when I receive [layer3 v] go to front
when I receive [layer2 v] go to front
when I receive [layer1 v] go to front
Offline
CAA14 wrote:
and, once i get this project finished, I'd love to hear how to make my own variable viewer.
CAA14
P.S. Over all, how was my first project?
Great and fun! I think that you could really work on making it more compact in general and more resourceful when it comes to variables, though you did a nice job!
Now, about the variable viewer, first what you'll have to do is create a sprite with costumes of the numbers 0~9, with 0 being the first costume, 1 being the second costume, ect... Then, just repeat that till you have as many as you need. Finally, make it turn into whatever costume you need. Here are some samples:
Note: This is a sample script of the ones place.
when gf clicked forever switch to costume (letter (length of (Score)) of (Score))Note: This is a sample script of the tens place.
when gf clicked forever if <not <(Score) < (10)>> switch to costume (letter ((length of (Score)) - (1)) of (Score)) else switch to costume [0 v] end
Last edited by ErnieParke (2013-01-20 15:27:23)
Offline
Thank you so much!
I will attempt to correct the script.
Question:
Ummm, the layer thing isn't making any sense... It looks to me like it will make the targets go to the front, or does "move to front" keep in mind other sprites that are also in front and fall in the back of them, or does it reset the front?
Thanks a lot!
CAA14
Offline
I tried the score thing, and it didn't work...
maybe i did it wrong, i made a new sprite with 10 costumes, 0-9, and then put those two scripts that you told me about in it.
CAA14
Offline
CAA14 wrote:
I tried the score thing, and it didn't work...
maybe i did it wrong, i made a new sprite with 10 costumes, 0-9, and then put those two scripts that you told me about in it.
CAA14
Well you're going to need more than one sprite, and each one needs it's own individual script, not both, or else it won't work. Again, could you show your scripts?
CAA14 wrote:
Thank you so much!
I will attempt to correct the script.
Question:
Ummm, the layer thing isn't making any sense... It looks to me like it will make the targets go to the front, or does "move to front" keep in mind other sprites that are also in front and fall in the back of them, or does it reset the front?
Thanks a lot!
CAA14
You're correct when you said that it "keep in mind other sprites that are also in front and fall in the back of them", so the targets would end up in the back, the Blast would end up in the front, and your Block sprite would end up in front of the targets.
Edit: I don't know if you know this by now, but if you ever want to close one of your topics, you can just use the report button. The same goes with editing them.
Last edited by ErnieParke (2013-01-20 16:44:03)
Offline
Ok, thanks,
I'll upload a beta #2 now.
I will forget about the score display until i get the layers working.
Thanks,
CAA14
Offline