Is there an tutorial for an event hat

ive been trying to make an event hat for when you stop the project but i cant without other scripts. Is there an tutorial for how you can make the event hat?

No need to - its built in :~)
untitled script pic (34)

And welcome to the forums! Just a note that other people might not be as fast as I was (they may be if they’re on at the same time you made the post, but don’t bet on it too much). :~)

A note on that block. It only runs for 1 frame, so if you have somrthing like a forever loop or a wait block, the script will stop prematurely.

@mark4sisb has a block, drag this photo into snap

thanks

Your welcome! Now also, if you DO want to make your own event hat for a reason, you can. Go to the make a block dialog (which I’m presuming you know about, if not read the manual; even though hats might be there too. Can’t get too carried away):

Customize your block as normal; but click on the event hat option.

Now, see that report? If you made a reporter/predicate block before you’ll recognize this. You’re meant to drop a boolean (<true>) into here (or something that returns a boolean, e.g. a predicate block, a variable, etc). And now, when this block is inserted anywhere, Snap! will run it every frame and check the return. If its true, it will run the block. But note that after it turns true, Snap! wont run any more until its false again (and then when its true again, it’ll run). So boom!

Also, if any reply helped you here, you can mark it as a solution (button under the post)