When i touch an actor, i would like it to change scene and delete another character.. hELPPP!!!

zCharleszCharles Member Posts: 5
edited October 2012 in Working with GS (Mac)
Hello,
i need some help!
I am trying to work out how to do a "buying option"..
I have a shop, and another page with padlocks on it, stopping them from proceeding..
So what i want to do is :

When i click the buy button in the shop, i would like it to change scene to the other one called "Secrets"
and deleted the padlock..

How do i do this?

Thanks

Comments

  • gamesfuagamesfua Member Posts: 723
    You could benefit from some tutorials on using tables. I'm not great at tables so i'm going to use some basic attributes and rules. That said definitely check out tables.
    Heres what you can do.
    Make a boolean for your padlock. Set the padlock actor to say IF user has not bought XYZ then be FALSE. IF user has bought XYZ then turn padlock to TRUE. When TRUE change graphic to unlocked, or delete padlock, and change scene.
    A way to find out if the user has bought something is to use an attribute like a boolean. So if user buys CHAIR then set chair boolean to true- otherwise false.
    Make sense?
    Good luck.
    And again please note that a buying system may benefit from using tables instead of relying solely on the attributes ive mentioned.
  • zCharleszCharles Member Posts: 5
    Honestly, that made no sense.. Could you email me a screen shot?
  • carlblanchetcarlblanchet Member Posts: 755
    edited October 2012
    Again, as anatomyofdreams said:

    Make a boolean attribute, lets call it SecretsLocked and set it on true.

    When the store item is purchased (touch is pressed), change attribute SecretsLocked to false, and change scene to Secrets.

    In the padlock: if SecretsLocked is false, destroy actor / or change image to an unlocked padlock.

    If you want the padlock to destroy before changing the scene, put the change scene behaviour in a timer: after __ seconds.

    This should be easier for you to understand. If it is not; start reading through this http://cookbook.gamesalad.com and watching these
Sign In or Register to comment.