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
Offline
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.
Offline
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
Offline