I found a file someone uploaded and tried to add more content which would snap to 15 different locations.
I copied the events (of red) and changed the names accordingly but the new objects all snap to the same block and ignore the other ones.
I want to learn how to implement this feature and hope that someone would be able to point me in the right direction.
The final goal is to have 12 different colored blocks that can be snapped to any of the 15 locations.
Thanks for any hints and advise which helps me to do this. - V
Take a look at the attached file. I modified your capx as follows:
1 - I added a family called "Colors" and put all the dragable sprites into it.
2 - I gave the pin and drag and drop behaviors to the family.
3 - I modified all the events for red to instead use the family.
4 - I removed the pin and drag and drop behaviors from the individual rectangles so you don't have to duplicate your events for each.
first of all, THANK YOU for helping me!
I will need to upgrade before I can open it because I am using release 168 and you seem to use 170.
The other day, I used a pre-release and had trouble saving because there was an issue with minify.
Anyway, I will upgrade for sure because I am curious to learn what you have made.
Again, thank you for working on this,
Wow, this is awesome!
Thank you for showing me how to make this kind of app.
What would be the best way to attach one unique sound to each of the colored blocks?
Develop games in your browser. Powerful, performant & highly capable.
Add an instance variable on each color containing the file name of the sound and add an audio action to play a sound by name using the variable.
I have not used instance variables yet .... but I will try and see if I can figure it out.
I am really impressed by what you have done. - V
P.S. Could you show me how to to this for one color?
What would I use for Name, Type and Initial Value?
P.S.S. I am also wondering how I could implement a feature which gives me a new instance on start drag (to create an endless supply of note blocks).