scratch-vm icon indicating copy to clipboard operation
scratch-vm copied to clipboard

how can i listen for a broadcast with js?

Open DemonLordDiablo opened this issue 1 year ago • 0 comments

i am trying to make a custom block like: whenbroadcastreceived(message){ //do whatever with "message" }

i can use: vm.runtime.startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: data, }) to send a broadcast, but how can i listen for a broadcast?

DemonLordDiablo avatar May 15 '23 19:05 DemonLordDiablo