Wait till I receive block

snap has a hat block called when I receive
and I think adding a version of the block that waits until it receives a broadcast

Already added
Wait until <(message::control) = [message1]>
Just in dev mode for whatever reason

There was a (now deprecated) message reporter that you could use to achieve this same thing. The message reporter was moved to dev mode only because the snap team doesn't want you to use it, as there can be issues with broadcasting different messages in quick succession. The only reason the block still exists is to not break old projects.

if you for whatever reason don’t want to use it (I don’t see why not in this case) you can do this

untitled script pic 120
But I don’t believe this works in a warp situation

And this if you are broadcasting data

how I get dev mode

Shift click the snap logo

is it possible to do that on a touchscreen device
because that’s what I’m using at the moment

Go into a block input, press the caps lock button and then click the snap logo without closing the keybord

dev mode is so cool
I wondered where the run/call with continuation blocks whent

Yes, they never really left us. None of the blocks ever have.

there was one block that left us
I remember when the if block had an arrow
but when you clicked it it just had an else thing so it would be

What that’s been added it was added in 9.0, you know the current version

I'm not sure what you mean by that but AFAIK the block below a hat block is guaranteed to be run when the hat block is triggered in any situation.

i.e. they can be considered as being wrapped in their own little warp block

Broadcasts are a little weird when it comes to warps

Could you give an example of what you mean?

Because broadcasts are a seperate script entirely they don’t abide by any warps meaning sometimes they can take a frame to trigger and other times they don’t

If broadcast is inside a warp then it will generate an event (might be wrong word to use) when it is encountered

But since, it IS inside a warp, the Snap! on receive hat may not respond to the event until sometime later *

Would this explain the effect your seeing?

* as opposed to a set variable type block

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.