Am I losing my mind? Can someone tell me what I am doing wrong?

Hello,

Thanks for reading, I hope that you can give me some piece of mind and figure out what is going on.

Basically, I am trying to set up a buy button, which then changes to upgrade. The buy/upgrade button changes an attribute, another actor then changes an image depending on that attribute. The attribute is initialized at 0, each time the actor/button is pressed it should increment until it reaches 5, at which point everything is finished.

Now the button works almost as expected, however after pressing the very first Buy button, it immediately jumps to 2.

I have a lot of experience in objective c programming, and I know simple mistakes like this are very easy to make. No matter how hard I try I cannot figure out why its not working as intended, hopefully someone smarter than I can explain why it behaves like this, and a work-around for it.

http://d.pr/IGZV/3KZatYuq

That is the behaviors as outlined above.

Thanks Again, if you need any further detail ask away.

Comments

  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    Yep, you're losing your mind. :P
    I don't have time right now, but if no one else has looked in to it by tomorrow, I'll take a look. :)
    - Thomas
  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    edited April 2013
    Change when touch is inside to when touch is released.

    It's going through the first rule, which changes the attribute to 1. That makes the second rule true and therefor adds another one.
  • DizzyGoldDizzyGold Member Posts: 1
    Gah, seems so simple now.

    Thank you very much, worked first time!
Sign In or Register to comment.