I’m writing an inform 7 game with some copmplicated variables. This sometimes causes a bit of lag and in some instances every turn when statement still gets printed when the previous statement should have stopped it because it changed a value. It resets the value correctly on the next cursor entry, so my variables are working, i just need a way of refreshing the computer at certain points.
Instead of taking Puss when the treevalue is occupied:
say “You grab the little fluffball from the tree.”;
Now the orange cat is in the garden.
But I’ve also got a statement that should stop after the cat is in the garden but it runs on.
Every turn when the orange cat is in the tree:
say “The big hairy dog from next door barks at the furry thing moving in the tree.”
What exactly do you mean by “refreshing the computer”? Could you post a longer sample of your code that reproduces the problem?
An Inform program is single-threaded – it does everything in the same order every turn, one step at a time. If a rule runs slowly you might see a delay before the input line reappears, but you won’t see things executed out of order.
So you are certainly seeing the effect of a mistake which has nothing to do with lag. As Draconis says, you’ll have to tell us more about what you’re doing.
(It’s also true that you might be able to get rid the lag. This is harder than fixing a bug – you’ll have to look at all of your code and understand what it’s doing that might take a lot of computation. But it’s a separate problem.)
Thanks for your quick response and help. I have changed the variables from word values to number values and it seems to have fixed the problem. I think I was making the value path a bit too convoluted before.