Reseting the gameAttributes

I asked this question sometime ago but still no luck, I apologies in advance if my method isn't clear as Im trying to put it in the best way I can.

Any way, I have a breaker type game where there are bricks, a ball and a moving pad. The idea is to break all 4 bricks per stage and move to the next. I have a game control actor with a set of rules and a game Attributes with Bricks on Screen set to 4. Each time I break one it decreases till reaching zero and moving to the next scene (stage).

The problem is, when I finish a stage ad move to the next it appears to be empty. I have figured out that the reason this happens is that the gameAttributes (Bricks on screen) are already zero and I need some kind of rule to set it back to 4 after every scene. I have triad many rules and stuff but nothing works. Appreciate any help as Im trying to realese a game for 5 months now but cannot over come this.

Thanks

Comments

  • BBEnkBBEnk Member Posts: 1,764
    are you actually changing to another scene? if so just have a actor with a change attribute behaviour thats change "your attribute name" to 4. and make sure this actor is at the bottom of your layers so it happens first.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited December 2013
    And more generally speaking, wherever you have a rule that detects the end of the level, add Change Attribute game.BricksOnScreen to 4 to the end of that rule right before you change scene or change level.

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

Sign In or Register to comment.