I'm working on a scratch project, and I want to add a feature that involves mesh. The thing is, the project has lots of broadcasts in it, and if it was connected to another instance of the project through mesh, they would call each other's broadcasts and mess up the structure of the project. Is there any way to avoid this by only sharing variables and only particular broadcasts using mesh?
Offline
I guess you could by editing the ScratchServer code in the browser, but that would be hard and not worth it for just one project.
Another solution is to have two different projects. One with the broadcasts the same, and one with the broadcasts changed (ex. "play" becomes "play2" except the broadcasts you want to go through mesh.
Offline
ok, but with a lot of broadcasts, it may take a while.
I was thinking I could have a third project, written in panther, that acts as a connector; when one project wants to send or receive some data, the connector project gets the data and puts it in a variable, the disconnects from one project and connects to the other, accessing the variable. This could work as panther can connect to mesh dynamically and can keep track of IP addresses.
Offline
joefarebrother wrote:
ok, but with a lot of broadcasts, it may take a while.
I was thinking I could have a third project, written in panther, that acts as a connector; when one project wants to send or receive some data, the connector project gets the data and puts it in a variable, the disconnects from one project and connects to the other, accessing the variable. This could work as panther can connect to mesh dynamically and can keep track of IP addresses.
Yeah, I guess that would work, too. It may be slower than regular mesh. And if you don't know which project should be the host, the Panther project should be joining mesh, and the other projects should be hosting mesh. Then, as you said before, the Panther project just connects back and forth between projects. There would be some issues, though but they can be fixed easily.
Offline