How do I use the same color fill on multiple sprites?

0 favourites
  • 6 posts
From the Asset Store
An educational game for Fill in the Blanks. An easy to use template for developers to build larger games
  • I've made my first piano and now I am trying to optimize and tweak the project.

    Here is what I'd love to know:

    My piano keys are sprites and feature two colors.

    Is there a way to just make one key with the right fill pattern and then reuse that key many times?

    Please keep in mind that I need to attach a different sound to each key.

    Also, do I need to create two events per key?

    On touched to advance the animation to frame 1 and to trigger the sound

    On any touch end to return to frame zero.

    Last question. How can I have smaller black keys (on their separate layer) on top of white keys without triggering the sound of the white key?

    If I can get/find information on the above points then my piano would be good enough for testing.

    Thank you and you and W,

    vancouver

  • Have a look at my MIDI sample program. It has a keyboard:

  • Here you go. It's not that hard, just a little tedious to set it up.

    For ultimate control, use 2 types of white keys, with 1 indentation (for keys like Do, Mi, Fa and Si) and with 2 indentations (for keys like Re, Sol, La). That way there won't be any overlapping problems with black keys triggering the white keys bellow (you will need to adjust the collision polygons). In my example I just trimmed the collision polygon on the white keys to be just below the blacks.

  • blackhornet,

    THAT is seriously cool. I was just playing a couple of MIDI files .... very impressive.

    All in all, I am starting to get used to C2 and how things work. It will still take a few more days but I think that I will switch to C2 because it works for me.

    I might bug you down the road when ....

    Ciao for now,

    V

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • eli0s

    AMAZING! I had to update just to open your file but by the looks of it, this is VERY helpful to me.

    I am very grateful that you have provided that file.

    This is much more than I ever expected and I will learn a lot from it.

    Thank you, thank you, thank you!

  • Glad I could help You are welcome!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)