Custom rules sometimes change behaviour of when blocks



(NOTE: I don’t know that much about this glitch yet, but I will be editing (or maybe replying to) this topic if I find more information.)

I recently found a bug in Hopscotch which causes custom rules to make things inside certain rules (rules inside the custom rule, that is) always happen, ignoring the “When __ happens”. (That probably didn’t make sense, so I’ll give an example: Say you have a custom rule that includes a “When (value 1) > 10, increase (value 2) by 1”. This bug would cause value 2 to be continuously increased by 1 (even if value 1 isn’t more than 10.))

Anyway, here’s what I’ve figured out so far:

  • It only happens if the custom rule has multiple rules inside it
  • Set value blocks don’t work at all
  • Increase value blocks ignore the “when __ happens” part, just like most other blocks
  • A few blocks (such as set invisibility and change colour) don’t ignore the “when __ happens” part; they just work as normal.
  • Blocks don’t completely ignore the “when __ happens” part; if it includes a “When __ = __”, the blocks obey that part of it. (e.g. If you have the when statement “When x = 1 and y < 5”, the things inside that rule don’t happen if x isn’t equal to 1. However, they can still happen even if y is not less than 5.)

If anyone has more information on this bug, it would probably be helpful to share it in a reply.


Well, that’s interesting.
@rodrigo @ana?


Hi @Mathgirl

That glitch sounds crazy. Do you have a project, even if something in-process, that exhibits this behavior? I’ve never seen anything resembling this so I’d really like to have a look.


Here’s a link to the project I found this glitch in:

The code showing this behaviour is in the object called Platform, and the bug stops if you take the custom rule “Obstacle (long rectangle)” out of the custom rule “Obstacle”. (note: Tap the Start/Stop Turn button to trigger the bug. If the bug’s happening, you’ll know because of the numbers near the top of the screen continuously changing.)

(hopefully that made sense)

note: the way I made the Start/Stop Turn button trigger the glitch isn’t part of the glitch, it’s because of something I forgot to put in the first post before:

(the glitched when statement includes “when Turn Started = 1”)


This is really weird. I hope that THT can fix this as soon as possible.