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!
Offline
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:
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)
Offline
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 . 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...
Offline
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
. 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?
Offline
lol I may. I fixed the problem but have another problem most likely related to that script . I'll post the project when I can get on my computer.
Offline