After some hours of investigation and playing around with it, I'm still struggling with using some sprites as control. They just don't react and I'd be really happy to get some help on that.
This is the link to the game: shiatsu-farfalla.ch/images/ShiatsuFarfallaSchmetterlingsjagd
As you can see, the loudspeaker control doesn't work at all. Also, if you choose the spray tool, you can't choose another tool anymore in the left toolbox - even though it's done the exact same way as all others.
Could you please give me a hint, where I'm struggling? If you want to load the code, you can find it here: 1drv.ms/u/s!AkLulg6vZ7gbrXhjE4eLmYLl-VZU
Attached, you find my "control" section.
Thanks a lot
When you touch objects above each other you touch them all. The problem with the spray is once its attached to cursor you are touching it as well as the other items so cursorstyle is set to 2 and you keep hold of it. To resolve that maybe add in some other logic like if you touch any of the selectable objects then it resets the cursor and all positions of the objects first then selects the one you are touching. For the loudspeaker try one object with an animation of 2 frames or 2 animations to change between on/off and toggle a variable 'on loudspeaker touched' which switches between the animation. Be careful with 'is touching' too as it runs constantly whereas 'on touched object' triggers once.
Thank you for the answer. I'll check that out, that sounds very helpful.
I'll Post the final solution as soon as I managed to handle it.
Thanks a lot!
Develop games in your browser. Powerful, performant & highly capable.
So, loudspeaker logic worked perfectly, thanks!
This is my solution
Then, I just have one Sprite called "controlMute" and in there two animation (Initial-animation is Mute):
I'll have another try with the spray and let you know.
Thanks for the help
Sorry for the late reply.
I managed to handle my toolbox on the left by automatically putting the two non-chosen tools on top.
So, this is working now.