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

#1 2008-06-29 21:14:48

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Can't detect first turn

Alright, in my game, I have turns. I have a script that basically is:
repeat 7 times:

change {turns} by 1
stamp
change Y by -24
Broadcast •••• and wait

Than when they sprite receives the message, it sets a variable according to turn number, but the problem is it always sets turn 1 to turn 2, as in, it doesn't work on turn 1, but they rest do. I seem to experience this a lot. Help please.


P.S. The sprite that I am having trouble with, when it receives, it is a big line a if blocks


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#2 2008-06-30 11:16:23

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can't detect first turn

Possibly you have an initialzation problem.  Are you setting turns to zero or one (not sure which one your code wants) on Green Flag somewhere?  Are you sure that is happening before the code that changes it does so?  Sometimes it's a good idea to put a short wait before code stacks that are depending on a certain value of a variable to make sure the Green Flag reset has time to do the initialization before the stacks that change or look at the value.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-06-30 11:21:44

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Can't detect first turn

Paddle2See wrote:

Possibly you have an initialzation problem.  Are you setting turns to zero or one (not sure which one your code wants) on Green Flag somewhere?  Are you sure that is happening before the code that changes it does so?  Sometimes it's a good idea to put a short wait before code stacks that are depending on a certain value of a variable to make sure the Green Flag reset has time to do the initialization before the stacks that change or look at the value.

It sets it to zero. I had to change it around a bit. I used to have it set to 0 than immediately it would change by 1 and broadcast check and wait. I had to switch it so it started at one, and after the broadcast, it switched it.

P.S. If you need to see it, it's my scrabble game


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer