Make local variables in custom abilities different for each rule

A feature I’d like to see in Hopscotch is:

When using a custom block in two rules at the same time, the local variables to not be shared.

I’d use it for this type of project:

Everything where a custom block needs local variables but also needs to happen multiple times at once

Here are some examples of Hopscotch code that could be improved if we had this:


That’s very useful wow


I think this seems to be a bug (unintended behaviour), since the value of the local variable should only exist in the container where it is used, and not be shared across different objects.

I’ll check, and update the category accordingly if so.


omgggggg this bug is breaking my gameeee

Oh, yeah this is a bug and it will be fixed in the next major update — we came across it in the context of abilities with parameters. (I just moved it to the #hopscotch-bugs:bugs-in-player category)

1 Like

This should also be fixed in webplayer 2.0

1 Like

5 posts were split to a new topic: Local variables in nested custom rules should not bubble to outer rule

will this be fixed soon? just wondering :)

1 Like

I haven’t had a chance to look much into the case that Awesome_E mentioned yet, so I’ll just remove the #in-development label for now

1 Like

The issue in the project from the original post here has been fixed — this was for custom abilities being run in different rules and sharing local variable values:

@Tri-Angle The problem in the original post has been fixed in the current webplayer version ^^

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.