Count Attribute question

This is weird!! Attached is some 'code' I have for reducing a 'game3lives' integer attribute. Unfortunately when one of the conditions is satisfied, the count is decreased by two, not one. I confirmed that only one of the conditions are met. I tried having only one condition in the rule but the attribute still decreased by two. Any thoughts on what I am doing wrong---once again!

Thanks!!!

http://www.mediafire.com/view/?2ejlqpgl7ye77y9

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    @PaxPax You're welcome. One thing you can do (save your file first!) is to delete an attribute from the list of game attributes by clicking on it and then on the minus symbol. You will be prompted with a message asking if you are sure you want to delete the attribute from ... and then it lists all of the actors that are using that attribute. You can of course cancel at that point.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Do you have more than one actor or more than one instance of this actor on the scene? Did you select game.3 lives from the expression editor drop-down attribute menu or did you type in game.3 lives? Is it possible that this actor is colliding with more than one of the listed actors (enemylaser, Asteroid-2, and Asteroid-1) at once? Is it possible that this actor collides with one of the listed actors and then briefly does not collide and then briefly collides again (almost a stutter)?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • PaxPaxPaxPax Member Posts: 106
    Hi tatiang, Unfortunately I did review all of that before my post and could not find anything wrong. I ended up removing the attribute to decrease the game.3lives and all of a sudden it started counting down by one instead of two. Obviously I am tired and cannot find where I put in the code. Also, as a newbie I am not yet efficient in my coding---am getting better however. Thanks for the support.
Sign In or Register to comment.