Need help for a piano app...overlapping problems

akimannakimann Member Posts: 62
edited November -1 in Working with GS (Mac)
I´m writing a piano app. The problem is, that the white an black keys are overlapping. So when I press the black key, e.g. "cis", the white key "c" will also be activated. Of course I tried attributes like "black_key_down=true" so that the white should not be pressed down when I hit the black ones. But this will only work when I hit the black key the second time. On the first touch the white key is also active, because only AFTER the first touch on the black key the attribute is activated. It´s frustrating! Isn´t there a possibility to block the overlapping area?

Comments

  • RHRH Member Posts: 1,079
    It may not be the one that tshirtbooth is referring to but here you only select the actor that is on top. The demo wasn't made for this but you can manipulate it to suit your needs. You will also have to layer the actors correctly in the scene so that the black keys are all on top of the white keys.
  • xyloFUNxyloFUN Member Posts: 1,593
    akimann said:
    I´m writing a piano app. The problem is, that the white an black keys are overlapping. So when I press the black key, e.g. "cis", the white key "c" will also be activated. Of course I tried attributes like "black_key_down=true" so that the white should not be pressed down when I hit the black ones. But this will only work when I hit the black key the second time. On the first touch the white key is also active, because only AFTER the first touch on the black key the attribute is activated. It´s frustrating! Isn´t there a possibility to block the overlapping area?

    Hi akimann
    (by calling the c-sharp "cis", I can tell you are Eurpean)

    The solution is a very simple one and just a little while ago, i was puzzled by it too.
    In Flash, you draw a shape and that shape is your hot spot clickable area but with gamesalad it's done this way:
    To map out an L shape, simple use two actors!

    This means that for every white key, you will need two actors (one in between the black key(s) and one for the normal lower part of the key :)

    Good luck!

    Here is what i just uploaded the other day: http://ernstrenner.com/forum/viewtopic.php?id=44
  • akimannakimann Member Posts: 62
    @xyloFUN:

    This solution is so perfekt! Thank you a lot!

    Greatings from Germany!
  • EminemEminem Member Posts: 667
    hi,

    Toastkitten was kind enough to make me a demo :D

    http://gamesalad.com/game/3404

    here it is

    TK made it a while back for me
Sign In or Register to comment.