Receive messages from all components with one receiver
Vasim S
Yeah the current implementation of Components is barely as powerful as it can be. I posted this as a feature request, which I think(imho) would be the most intuitive: https://protopie.canny.io/feature-requests/p/components-and-global-variables
Why can't components just have access to Global Variables? This might be a super dumb question but I'd love to be educated.
Christoffer Engström
I just found a solution for my case.
By using "Current scene" instead of "Component", I can listen to any message within the same scene.
P
Pepe
Christoffer Engström: Yes, you are right :) Thanks for pointing that out. But what does the "outside component" setting do then?
Christoffer Engström
Pepe: Maybe you need it if you want to send info back to the component. 🤷���♂️Like they do in the demo with checkboxes.. Not sure..
Vasim S
Christoffer Engström: Great find! Very unclear and unintuitive if this actually works.
Christoffer Engström
Yes! As components work now, I still need triggers for every single button on my artboard.
For instans if I want the user to rate from 1-10, with this feature I would only need 1 receiver, instead of 10. Listening for the message "rating" and use value 'label'.text to know what rating assign the variable.
Suchit Thakkar
Christoffer Engström: Hi ! I am Suchit, I have started using protopie since few months. I have one question. We have made global variables.
When we make components, then how can we link global variables with component ?
Thanks