Search code examples
if-statementmit-scratch

Why doesn't my if-then statement in Scratch ever trigger?


I have been using Scratch for a few months, but am suddenly completely and inexplicably stuck. I can't get a simple if-then condition to trigger. After stripping down to the bare essentials, I have this: enter image description here

the variable d successfully changes when I press space, but never triggers the if-then, even when d=5, as confirmed by the display. What am I missing?


Solution

  • You need to add the variable to the expression, like this (Notice the orange color of d, drag it from the section "Variables"):

    enter image description here