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

#1 2010-07-14 15:03:37

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

This Script is Driving Me CRAZY!

Why would I pay $500 for a piece of bacon? Because I'm CRAAAAZY!

I'm using a sensor to say if touching black and the powerup is number 2, then it'll set the variable to 1 meaning don't move left. For some reason, the variable isn't being set to 1. The statement is true, but nothing's happening. Help!

http://i821.photobucket.com/albums/zz140/Sunrisemoon/annoyed.gif


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#2 2010-07-14 16:18:26

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: This Script is Driving Me CRAZY!

link the project please


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#3 2010-07-14 16:38:57

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: This Script is Driving Me CRAZY!

Hmm.... What is the powerup's time? If it is more than 0, then I know what the problem is. The variable is changing, but it is just changing back really quickly. Here's your script all scribbled on:

http://img686.imageshack.us/img686/434/annoyedi.gif

So, it checks to see if what is circled in green is true. It is. It changes the variable to 1. It skips the stuff in red. Now it goes to blue. The forever block repeats pretty fast- the "Which  Powerup?" variable probably can't change from 1 to 2 before it gets to the blue stuff. So, if the green is true, the blue must be false. Since the blue stuff is false, it skips to the "else." If "powerup's time" is more than 0, it will change the variable in question back to 0. All this happens before you can even notice that the variable changes at all.

Last edited by scmb1 (2010-07-14 16:45:47)


http://i48.tinypic.com/2z5pqad.png

Offline

 

#4 2010-07-14 16:54:45

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: This Script is Driving Me CRAZY!

scmb1 wrote:

Hmm.... What is the powerup's time? If it is more than 0, then I know what the problem is. The variable is changing, but it is just changing back really quickly. Here's your script all scribbled on:

http://img686.imageshack.us/img686/434/annoyedi.gif

So, it checks to see if what is circled in green is true. It is. It changes the variable to 1. It skips the stuff in red. Now it goes to blue. The forever block repeats pretty fast- the "Which  Powerup?" variable probably can't change from 1 to 2 before it gets to the blue stuff. So, if the green is true, the blue must be false. Since the blue stuff is false, it skips to the "else." If "powerup's time" is more than 0, it will change the variable in question back to 0. All this happens before you can even notice that the variable changes at all.

That's not quite the way my project works, but thank you for trying to help  smile . I should probably upload my project, but I don't want anyone to download it and steal my coding before it is completely finished and then upload it as their own...


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#5 2010-07-14 17:00:22

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: This Script is Driving Me CRAZY!

Sunrise-Moon wrote:

scmb1 wrote:

Hmm.... What is the powerup's time? If it is more than 0, then I know what the problem is. The variable is changing, but it is just changing back really quickly. Here's your script all scribbled on:

http://img686.imageshack.us/img686/434/annoyedi.gif

So, it checks to see if what is circled in green is true. It is. It changes the variable to 1. It skips the stuff in red. Now it goes to blue. The forever block repeats pretty fast- the "Which  Powerup?" variable probably can't change from 1 to 2 before it gets to the blue stuff. So, if the green is true, the blue must be false. Since the blue stuff is false, it skips to the "else." If "powerup's time" is more than 0, it will change the variable in question back to 0. All this happens before you can even notice that the variable changes at all.

That's not quite the way my project works, but thank you for trying to help  smile . I should probably upload my project, but I don't want anyone to download it and steal my coding before it is completely finished and then upload it as their own...

Yeah, that could be a problem... You could make a test account and upload it there. Less people would see it that way.

Or, you could just explain to me how your project does work, unless that would take too long. Is "powerup's time" never more than 0 if than 0 if "Which Powerup?" is 2?


http://i48.tinypic.com/2z5pqad.png

Offline

 

#6 2010-07-14 17:02:50

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: This Script is Driving Me CRAZY!

Don't let your own paranoia work against you  hmm
post the project


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#7 2010-07-14 17:09:46

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: This Script is Driving Me CRAZY!

lol I may. I fixed the problem but have another problem most likely related to that script  yikes . I'll post the project when I can get on my computer.


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

Board footer