Hat block in sprite extension not runs


Hi, I´ve put an event (hat) block in a sprite extension, but never runs. Even if I code this:

(args, app, device, block) => {
return true;

I appreciate your help. Thanks, regards.


That code is for live mode, correct? That may be your problem.


@Best_codes No, this time is a sprite extension. Regards!


Consider using a JavaScript Function, @astoctas:
Put your function definition in the “Common code settings” section of the extension builder:

That works for me.


@Best_codes but i am doing as simple as that

How could I make it work?


Hat blocks don’t return values…


@Best_codes. so how can i make it work? Thanks!


Well, what do you want to do with it? @astoctas


@Best_codes. I want to execute blocks under this one if a condition is true, like documentation

So does “When click in green flag”


I’m working on it…


@astoctas wouldn’t this code work?


@Best_codes I guess that an event block is just like a “forever and if” but how can I code this in an extension?


I’m working on an extension that does that. When I’m done, I’ll take some screenshots and send them to you. @astoctas


Any news about this? Regards!


Still working on it. I’ve been really busy with other stuff too. Sorry.