Weird shop problem

Matti91Matti91 Member, PRO Posts: 14

Dear all,

I have created a shop in my game where it is possible to buy visual changes for my main actor (in game coins, not real money).
My shop contains of 3 pages with 4 visuals on each. Prices go from lowest to highest. To make this simpler to understand and to explain for me, let's say that every button in the shop changes the color of my actor. So I have a attribute called game.color, starting at 0.

Page 1 contains of game.color 1, 2, 3, 4.
Page 2 contains of game.color 5, 6, 7, 8.
Page 3 contains of game.color 9, 10, 11, 12.

Lets say game.color 4 is yellow and game.color 8 is blue.

I go to shop page 1 and buy color 4. Then I go to shop page 2 and buy color 8. My actor is showing in the shop so I can see him changing. When I then return to page 1 my actor automatically turns yellow (4) again, even though I didn't press the button again. When I go back to page 2 it automatically changes to blue (8) again.

Also fx if I have bought both color 3, 4 and 8 and chosen color 3. Then I go to page 2 and it turns to color 8. Then I go to page 1 and it turn to color 4. So it's like it can't show the color from another page, but automatically the "highest" color from each page.

So my question is, why is the color of my actor changing when I'm going to another scene?

Maybe I'm tired or something, but I really can't see what is causing this. Can anyone help me? In case you need me to explain it more just ask.

Cheers

Comments

  • ToqueToque Member Posts: 1,188
    edited November 2016

    Your colour comparison is confusing. I think it would easier if you use what it actually is. Do all colours refer to one thing? Or 12 different things? Or literally 12 colours of one thing?

    I assume you are using attributes for this?
    Your using separate attributes for each?
    These attributes are game attributes right?
    You would need twelve attributes?

    Then maybe

    Then you must have a rule in that scene that is changing your attribute.

    So when that scene runs it reads change attribute color 4 is true somewhere.

    Check all your actors to see what's changing your attribute.

    Or the button that changes scene could have some rule changing things. ...

  • Matti91Matti91 Member, PRO Posts: 14

    Hi @Toque thanks for your answer. I apologize for describing my problem confusingly.

    I have just made a quick little project in GS that shows exactly what my problem is. I'm a beginner at this, and I'm having a hard time explaining it in words.

    Is it possible to upload it here or send it directly to you? If you (or anyone who reads this) don't mind taking a quick look at it to see if you know what the problem is?

  • Matti91Matti91 Member, PRO Posts: 14
    edited November 2016

    Hello again @Toque. I think I have just uploaded it here: http://publish.gamesalad.com/game/188742/edit
    Hopefully you can see it.

    It's just an example of a quick shop. Top number is coins. You can buy colors for the actor. I have made the shop so after you have bought a color you can always go back and equip a cheaper color again without having to buy it again. Try to buy all the 4 colors and then go back and forth between page 1 and 2. The color changes then. And since I'm still a beginner at this I can't figure out why...

  • ToqueToque Member Posts: 1,188

    No problem. I hope I or someone else can help. I'm not at my computer. I will try and look before bed. (A few hours from now )

  • Matti91Matti91 Member, PRO Posts: 14
    edited November 2016

    @Toque said:
    No problem. I hope I or someone else can help. I'm not at my computer. I will try and look before bed. (A few hours from now )

    Thank you very much :)

  • ToqueToque Member Posts: 1,188

    You would have to zip your file and drop box it to share it.
    I can't see that file. Must be your own private link.

Sign In or Register to comment.