I’m using @richard’s Improved Sprite Data extension to define methods local to sprites (A.K.A. “Sprite Functions”). These are quite limited because they do not accept parameters, meaning everything I want to pass to the function must be set in a sprite data variable (or worse, a global variable). This creates two issues:
-
All sprite function parameters are in the same namespace, causing messy code and potential name collisions
-
More function parameters requires more lines (blocks?) of code in order to call the function. For example, a function with four parameters would require five blocks: Four to set each variable, and one to call the function. Below is a real example from a project I’m working on. The “FadeToPalette” method has two parameters.

A global function would only require one block to do the same thing:
Is there an extension or another obvious solution to this problem?
(I suppose I could just use JavaScript instead of blocks…)
