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

Get help using Construct 2

Post » Fri May 16, 2014 9:35 pm

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 :)
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sat May 17, 2014 12:36 am

Have a look at my MIDI sample program. It has a keyboard: viewtopic.php?f=153&t=82039&p=666226#p666226
ImageImageImage
B
71
S
21
G
230
Posts: 3,687
Reputation: 128,845

Post » Sat May 17, 2014 1:07 am

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.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829

Post » Sat May 17, 2014 2:21 am

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 :)
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sat May 17, 2014 2:45 am

@ 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!
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sat May 17, 2014 3:47 am

Glad I could help ;) You are welcome!
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829


Return to How do I....?

Who is online

Users browsing this forum: Fradno and 15 guests