Weird Change Attribute Error?

Games4lifeGames4life Member, PRO Posts: 279
edited February 2016 in Working with GS (Mac)

There is this weird error that happens all the time in my game's store.
So when I buy a new bubble it equips
http://postimg.org/image/osyuihz3r/1c39a049/
then when I go back into the store again all of the attributes get changed to truehttp://postimg.org/image/5xqlmccap/dcc45820/
Here is the code
http://postimg.org/image/co8gnoiid/6cffa477/
http://postimg.org/image/jw31sqgwt/bf292e0f/

EDIT: Sorry for the links- Seems like GS' Pic Function is disabled.

Hope you can fix this!
Thanks,
~G4L

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    The way you've presented it, it seems like it should work. But I'm sure there's a lot more we can't see. You might consider stripping out anything you don't want to share (or that isn't relevant) and posting the file here.

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

  • Games4lifeGames4life Member, PRO Posts: 279

    Here is the file

    @tatiang

    Basically hit "use" on one of the items then either leave the store or go to then next page and all of the attributes will turn true for some odd reason.

    https://dropbox.com/home?preview=Finger+Line+GS_Fixed2C.gameproj.zip

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I think you posted the link for your own Dropbox account rather than a link to share the file.

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

  • Games4lifeGames4life Member, PRO Posts: 279

    @tatiang said:
    I think you posted the link for your own Dropbox account rather than a link to share the file.

    Sorry hear it is, https://www.dropbox.com/s/d148h9fpngxkage/Finger Line GS_Fixed2C.gameproj.zip?dl=0

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2016

    Just a hunch but in your equipg actor at the top-right of the Store scene, you are saving the game.Green Bubble attribute to the key "red". I'm guessing that might mess up a few things based on your color scheme.

    Edit: and then in your Load Store actor on the Store scene, you load all of the game.[Color] Bubble attributes from the same key: "red"

    So there you go.

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

  • Games4lifeGames4life Member, PRO Posts: 279

    @tatiang said:
    Just a hunch but in your equipg actor at the top-right of the Store scene, you are saving the game.Green Bubble attribute to the key "red". I'm guessing that might mess up a few things based on your color scheme.

    Edit: and then in your Load Store actor on the Store scene, you load all of the game.[Color] Bubble attributes from the same key: "red"

    So there you go.

    hmm... tried that and doesn't seem to be working. Any other tips?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Games4life said:
    hmm... tried that and doesn't seem to be working. Any other tips?

    I don't know what to do with "doesn't seem to be working." That doesn't really give me any information to go on. It could be crashing Creator, or it could be doing exactly the same thing as before -- although you also didn't explain what you changed or removed -- or it could be doing something different but still wrong.

    Did you change all of the keys to unique color values, for example? If so, how did that affect the problem. I noticed that it only seems to affect certain buttons/actors which is why I mentioned equipg but have you noticed that as well?

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

  • Games4lifeGames4life Member, PRO Posts: 279

    @tatiang said:

    @Games4life said:
    hmm... tried that and doesn't seem to be working. Any other tips?

    I don't know what to do with "doesn't seem to be working." That doesn't really give me any information to go on. It could be crashing Creator, or it could be doing exactly the same thing as before -- although you also didn't explain what you changed or removed -- or it could be doing something different but still wrong.

    Did you change all of the keys to unique color values, for example? If so, how did that affect the problem. I noticed that it only seems to affect certain buttons/actors which is why I mentioned equipg but have you noticed that as well?

    Sorry, excuse my lack of detail.

    I replaced the values from red to their value (i.e. Green=Green Orange=Orange)

    I changed that in the load attributes as well and it is still having the same problem. Shall I repost the file against tht the changed items?

  • ArmellineArmelline Member, PRO Posts: 5,368
    edited February 2016

    Posting a project file, even one stripped down to the bare essentials, results in a massively higher chance of getting your problem solved.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Armelline said:
    Posting a project file, even one stripped down to the bare essentials, results in a massively higher chance of getting your problem solved.

    I would just change that to especially a stripped down one. Sometimes people post project files with a ton of actors and scenes and the only instruction they provide is "the enemy doesn't march in the right direction." Without knowing the intimate details of someone else's game design, it often takes a good deal of time just to wade through everything to find what they are having a problem with.

    So any details you can provide such as "in the BlitzOne actor, the third rule has a change attribute behavior that doesn't seem to be working. When I replace the self.Time value in that expression with 5, the explosion occurs right after you pick up a volleyball on the Level 3 scene" are really helpful! :)

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

  • ArmellineArmelline Member, PRO Posts: 5,368
    edited February 2016

    @tatiang said:
    I would just change that to especially a stripped down one.

    Excellent point!

    When I was a newbie I was really hesitant to post my projects, even demo ones for people to fix specific problems, because I was worried I'd have done things in horrendously stupid and embarrassing ways.

    Years later I realise now that everyone does stupid things when they're learning, and there's not really a wrong way to do things. There's nothing to be worried or embarrassed about, and no judgment will be passed!

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @Games4life Maybe trying a different approach to your programming will solve your problem. The following way there's far less to go wrong.

    Make a game integer attribute, let's call it ButtCount

    In your first button:

    Rule: When touch is pressed
    Change attribute ButtCount to 1

    Rule:
    When ButtCount = 1
    Change Image equip1
    Otherwise
    Change Image equip2

    In your second button:

    Rule: When touch is pressed
    Change attribute ButtCount to 2

    Rule:
    When ButtCount = 2
    Change Image equip1
    Otherwise
    Change Image equip2

    etc.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Games4lifeGames4life Member, PRO Posts: 279

    @gyroscope said:
    Hi @Games4life Maybe trying a different approach to your programming will solve your problem. The following way there's far less to go wrong.

    Make a game integer attribute, let's call it ButtCount

    In your first button:

    Rule: When touch is pressed
    Change attribute ButtCount to 1

    Rule:
    When ButtCount = 1
    Change Image equip1
    Otherwise
    Change Image equip2

    In your second button:

    Rule: When touch is pressed
    Change attribute ButtCount to 2

    Rule:
    When ButtCount = 2
    Change Image equip1
    Otherwise
    Change Image equip2

    etc.

    @Armelline said:

    @tatiang said:
    I would just change that to especially a stripped down one.

    Excellent point!

    When I was a newbie I was really hesitant to post my projects, even demo ones for people to fix specific problems, because I was worried I'd have done things in horrendously stupid and embarrassing ways.

    Years later I realise now that everyone does stupid things when they're learning, and there's not really a wrong way to do things. There's nothing to be worried or embarrassed about, and no judgment will be passed!

    @tatiang said:

    @Armelline said:
    Posting a project file, even one stripped down to the bare essentials, results in a massively higher chance of getting your problem solved.

    I would just change that to especially a stripped down one. Sometimes people post project files with a ton of actors and scenes and the only instruction they provide is "the enemy doesn't march in the right direction." Without knowing the intimate details of someone else's game design, it often takes a good deal of time just to wade through everything to find what they are having a problem with.

    So any details you can provide such as "in the BlitzOne actor, the third rule has a change attribute behavior that doesn't seem to be working. When I replace the self.Time value in that expression with 5, the explosion occurs right after you pick up a volleyball on the Level 3 scene" are really helpful! :)

    https://www.dropbox.com/s/axf6a5rh6wu0vre/Finger Line GS_Fixed2D.gameproj.zip?dl=0

    Thanks for everything
    ~G4L

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2016

    The top-left Use button on the Store scene has another button underneath it titled "Buy." I think these overlapping actors might be the problem. Your BuySpawner actor spawns the Buy button actor so turn that off and see if that improves things.

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

  • Games4lifeGames4life Member, PRO Posts: 279

    @tatiang said:
    The top-left Use button on the Store scene has another button underneath it titled "Buy." I think these overlapping actors might be the problem. Your BuySpawner actor spawns the Buy button actor so turn that off and see if that improves things.

    So, all I did was delete the "Buy Spawner actor", but that did not fix anything. Any other suggestions?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    What I do when I'm troubleshooting a problem is to turn off or delete all actors and rules that are not essential to the function I'm testing. I do this one by one (or in small groups) so I can keep track of where the problem is once I find it. I also make use of Display Text and Log Debugging Statements to watch attribute values at all times while I'm doing this.

    It's quite a process!

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

  • Games4lifeGames4life Member, PRO Posts: 279

    @tatiang said:
    What I do when I'm troubleshooting a problem is to turn off or delete all actors and rules that are not essential to the function I'm testing. I do this one by one (or in small groups) so I can keep track of where the problem is once I find it. I also make use of Display Text and Log Debugging Statements to watch attribute values at all times while I'm doing this.

    It's quite a process!

    Ah yes, you fixed it! Thank you so much this made my day!

Sign In or Register to comment.