Help with variables

I want to make "if <"a" change by -1>
<change "b" by 1>
I don´t know how I can make this because it´s impossible to put "change a by -1" into the "if".
Thanks for help.Variables

What is this supposed to mean? The change block does not report anything for a reason. It just increments/changes the value of that variable by whatever else you put in it.
If you wanna check if the number is not 0 after decrementing, use < not < a = 0 > >

I want that a and b behave linear. So if a change by 1/-1, b should do it too.

Then you would need to make it so that every time you change a, you change b. There is no other way I know of to do this without creating a custom block to do it or broadcasting a message or something similar.

You could also just represent b as an offset of a.
For example, instead of using b, you can use < 10 - a >

This should solve your problem:
untitled script pic

Nice.

What's autorennen?

Thank you, it works now!

How can that work? The IF is only run once, before A has a chance to change. I think you have to put the IF inside a FOREVER.

you forgot to update Storage for a and it does essentially the same thing as just using 2 change blocks at the same time
aka
< change a by 1 >
and always following by
< change b by < neg of 1 > >
and vice versa

or constantly updating b to be < 10 - a >

My assumption is that A is changed by a parallel script, but, yes, the IF needs to be inside a FOREVER (or under a WHEN I RECEIVE a message).

:open_mouth: oups...

I want to fix the Bug with driving thew walls and make the cars controlled via keyboard. But this takes its time, because this bug costed me like 15 attempts... Bug: nomal script makes Snap! unusable

... if you're wondering: @f_m_fmbg is my past me