Overlapping help please!
Hi everybody, this is my first post in the forums. I've been using game salad for about 3 months,and just went pro 3 days ago. I'm working on my 2nd game/1st "masterpiece" lol and I'm having an issue solving my problem.
I've scoured the forums, watched videos from the gurus, but I can't seem to get this right.
The problem.
I have a piano in the game. The bounding boxes for the keys (black and white) overlap. When a key is touched, or tough is inside, it plays the sound. Currently, when I touch a black key, it plays the balck key and the white key next to it(overlapped).(the white boxes do not overlap, just the flats/sharps) Is it possible to have the layer on top,being the black key, be the only touch that is registered? I understand that with overlapping layers, when they are touched, both receive the touch. Can I set it so only the layer in front/top receives the touch?
I would love to here your thoughts and or possible solutions/workarounds.
Much appreciation for any help!
Eric
(
I've scoured the forums, watched videos from the gurus, but I can't seem to get this right.
The problem.
I have a piano in the game. The bounding boxes for the keys (black and white) overlap. When a key is touched, or tough is inside, it plays the sound. Currently, when I touch a black key, it plays the balck key and the white key next to it(overlapped).(the white boxes do not overlap, just the flats/sharps) Is it possible to have the layer on top,being the black key, be the only touch that is registered? I understand that with overlapping layers, when they are touched, both receive the touch. Can I set it so only the layer in front/top receives the touch?
I would love to here your thoughts and or possible solutions/workarounds.
Much appreciation for any help!
Eric

Best Answers
-
Okysho Posts: 158
The problem with GS is that you can't have a collision area that differs from a standard rectangle...
What you might be able to do is create a boolean value. When your over an overlapping black key, deactivate the white key and activate the black. -
jckmcgraw Posts: 647
@artfish
For the white keys, instead of when touch is pressed play noise (or whatever), do:
When touch is pressed and device.mouse.pos.Y is < (the bottom part of the black key), run sound and the animation you have.
Let me know how that works,
Jack McGraw
P.S. for the next response, if you mention my username (@jckmcgraw), I can respond quicker because I will be notified.
Answers
You could have the white keys just be images, and the part not overlapping with the black keys be invisible sensors that trigger the white note. I can't imagine people will be touching between the black keys to hit a white note anyways.
Hope this helps,
Jack McGraw
They keys also individually move to look like they are being pressed, and I really dont want to give that up bescaue it looks very cool.
Eric
Glad I could help
Jack McGraw