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

#51 2013-01-23 14:08:23

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

I just uploaded another version, It's the only one there besides my latest new project, Math Magic!

Regards,

CAA14

Offline

 

#52 2013-01-23 17:37:18

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to tell a variable to go to a certain location.

CAA14 wrote:

Okay, so I'm supposed to make it wait when?
I'll be honest, I only half understand what your saying, I think your saying I should get it to wait 1-7 secs before the "if" statement?

Regards,

CAA14


P.S. Another thing, the sign was not the same red as the target, but it still counted it as points... Very weird. So, reluctantly, I changed it to purple(So silly looking...).

Well, yes, correct.  wink

Also, you could still have the sign be red, just that you have to be careful not to make it the same red as the targets. Or, another possibility is that in your shooting sprite, you have this script:

when gf clicked
forever if <(touching color [Red]?) and (mouse down?)>
 Scripts...

A simple change would make it so that the sign could be red:

when gf clicked
forever if <<(touching color [Red]?) and <not (touching [open_Store v]?)>> and (mouse down?)>
 Scripts...

Last edited by ErnieParke (2013-01-23 17:37:40)


http://i46.tinypic.com/35ismmc.png

Offline

 

#53 2013-01-24 13:11:25

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

okay, cool.

I'll see if i can get the sign bug fixed, and BTW, Can you re download the project?

I re-released it several times, I think now the problem with the multiplier is that it does not show up. When i read through the script, it seems flawless, but i know it's not... I guess I'm not yet good at debugging my own projects yet,

Thanks again,

Regards,

CAA14

Offline

 

#54 2013-01-24 14:02:15

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: How to tell a variable to go to a certain location.

I know you have seen this a lot, there isn't a way... well, sort of there is.

So you have your score variable, make another variable named score2.
Then do these scripts:

when gf clicked
show variable [score v]
hide variable [score2 v]
forever
     set [score2 v] to (score)
when i receive [win v]
hide variable [score v]
show variable [score2 v]
But you CANNOT have score and score2 in the same spot. score 2 is where you want the score to show at the end.

Hope that helps!

Also, if you want to see it work, go to http://scratch.mit.edu/projects/SFollis/3026535

Last edited by SFollis (2013-01-24 14:03:02)


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#55 2013-01-24 16:20:25

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to tell a variable to go to a certain location.

CAA14 wrote:

okay, cool.

I'll see if i can get the sign bug fixed, and BTW, Can you re download the project?

I re-released it several times, I think now the problem with the multiplier is that it does not show up. When i read through the script, it seems flawless, but i know it's not... I guess I'm not yet good at debugging my own projects yet,

Thanks again,

Regards,

CAA14

Well, I just test played your game and saw the multiplier show up, so are you 100% sure that it's not showing up?


http://i46.tinypic.com/35ismmc.png

Offline

 

#56 2013-01-25 10:54:25

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Well, It's supposed to show up at least once each level... And last time I checked it doesn't show up for level 2...

Maybe I'm wrong... I'll double check.

But I know the block isn't showing up...

Regards,

CAA14

Offline

 

#57 2013-01-25 10:58:07

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Hi,

Thanks for the suggestion SFollis, but I figured how to get "score" where I want, Thanks though!

You just need to position it where you want when you upload it(which as far as I can tell, also saves it).

Regards,

CAA14

Regards,

CAA14

Offline

 

#58 2013-01-25 11:34:42

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Did you see my comment on your project? That should fix everything you mentioned.


Why are the secret organizations getting all the attention?  mad

Offline

 

#59 2013-01-25 18:40:44

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Yes i did sonicfan, but I don't know what your talking about as far as the changing the variables thing.

I fixed the variable position thing, but the multiplier still is not showing up on level 2 and 3 and the block is not showing up at all...

Regards,

CAA14

Offline

 

#60 2013-01-28 12:19:04

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Happy Birthday, ernie!


Regards,

CAA14

Offline

 

#61 2013-01-28 12:36:38

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

I downloaded, and fixed all three of those. It's very simple. I made the sign a slightly darker red, and it worked. The block and multiplier not showing up was the result of two variables not being changed in time. To fix this, on all scripts that stop if a variable equals something, put a set variable to block at the beggining of the scripts. And lastly, the variable was showing where it was supposed to be when I saved, so that worked too.

This was my comment, and here's what I meant.

when I receive [Level 2 Start v]
if <(variable) = [yes]>
stop script
else
do stuff
This is a replica of your current script. The problem is, due to the way that scratch reads scripts, even though you have a script that resets the variable, it can't do it in time. On all scripts in the multiplier and blocker that use this script format, do this.
when I receive [Level 2 Start v]
set [variable v] to [no]
if <(variable) = [yes]>
stop script
else
do stuff
That will fix your problems.

Last edited by sonicfan12p (2013-01-28 12:37:33)


Why are the secret organizations getting all the attention?  mad

Offline

 

#62 2013-01-28 12:41:14

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Thanks again sonicfan, I go to implement that now.  smile

BTW, is 2.0 out now?

If that doesn't work, then I'll post again... i hope i don't have to though.

Thanks again,

CAA14

Offline

 

#63 2013-01-28 12:58:20

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

The 2.0 beta is officially out, just go to beta.scratch.mit.edu to play around with it.  wink


Why are the secret organizations getting all the attention?  mad

Offline

 

#64 2013-01-28 13:02:04

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Thanks, and i implemented those things and it sort of works, so I'm closing the project and making this the last release, thank you so much for all the help sonicfan12p and ernieparke!

Regards,

CAA14

Offline

 

#65 2013-01-28 13:04:51

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

You are quite welcome!  smile


Why are the secret organizations getting all the attention?  mad

Offline

 

#66 2013-01-28 13:06:16

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

smile

Offline

 

#67 2013-01-28 13:14:47

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

so, scratch is going web based?

Offline

 

#68 2013-01-28 13:21:49

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Yes, though an offline version of 2.0 will eventually be available if you don't like working online. It'll be much easier to work on things though, so it's a good change!


Why are the secret organizations getting all the attention?  mad

Offline

 

#69 2013-01-28 13:53:04

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Oh, well, i really like that they're allowing you to make your own blocks, but they still don't allow you to organize your sprites...

Well, i loose internet often, so an offline one would be good.

BTW, do you know why one of my projects aren't showing up on the new scratch website?

It's "Mind Blowing Math! episode 2"... my favorite...  sad

Regards,

CAA14

Offline

 

#70 2013-01-28 14:24:20

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: How to tell a variable to go to a certain location.

That's because the 2.0 site mirrored the current site on the evening of the 25th. Anything uploaded after then won't show up until the full release of 2.0, hopefully in a couple of weeks or less.


Why are the secret organizations getting all the attention?  mad

Offline

 

#71 2013-01-28 17:00:39

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to tell a variable to go to a certain location.

CAA14 wrote:

Happy Birthday, ernie!


Regards,

CAA14

Thank you! I was giving out cookies earlier today, so here's yours:

http://i.imgur.com/1E2XkXO.jpg

Anyway, if you ever want to see something, here's a birthday project that I've made for myself.

CAA14 wrote:

Thanks, and i implemented those things and it sort of works, so I'm closing the project and making this the last release, thank you so much for all the help sonicfan12p and ernieparke!

Regards,

CAA14

Your welcome!


http://i46.tinypic.com/35ismmc.png

Offline

 

#72 2013-01-28 17:14:46

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

Yum!!
I love chocolate chip cookies!

Thanks!  wink

I hope you had a marvelous (Your age here)th birthday!

Regards,

CAA14

Offline

 

#73 2013-01-28 17:20:51

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to tell a variable to go to a certain location.

CAA14 wrote:

Yum!!
I love chocolate chip cookies!

Thanks!  wink

I hope you had a marvelous (Your age here)th birthday!

Regards,

CAA14

Well you're too kind.  smile


http://i46.tinypic.com/35ismmc.png

Offline

 

#74 2013-01-28 17:30:40

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: How to tell a variable to go to a certain location.

No, you're to kind! Spending all that time to try to fix such a mess!
Man, to kind...

Regards,

CAA14

Offline

 

#75 2013-01-28 17:40:02

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to tell a variable to go to a certain location.

CAA14 wrote:

No, you're to kind! Spending all that time to try to fix such a mess!
Man, to kind...

Regards,

CAA14

Well it wasn't that much time, and I do like helping people. Also, you're the only person on Scratch to say "Happy Birthday" to me, which is why you're so kind.  smile


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer