How do I toggle between selected buttons?

0 favourites
  • 11 posts
From the Asset Store
Toggles Dials Switches and Alerts ! A foundational sound grouping of Analog type switches and Steampunk effects
  • Hi all, I would like a bit of help regarding an issue I'm having with my shop.

    I have built an in-game shop, in which I can buy different in-game features, and use these during game play. The problem that I am having is that while I can make selections from the bottom item to an item above( ex first skip, then slow), I cannot do the opposite (first slow then skip). Would it be possible for someone to take a look at that in order to help me fix the issue?

    Here is the capx of my work so far : https://www.dropbox.com/s/utee9sockkxx8 ... .capx?dl=0 .

    Thanks to all in advance <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Assumed sections from the event sheet causing problems :

    Pictorial explanation of what is happening :

    Step 1: Link to shop is selected from menu and shop is displayed as such:

    Step 2: Player buys items - resulting in something similar to this:

    Step 3: Player decides to use third item as an aid during game. Resulting in this:

    Step4: Player changes his/her mind and decides to use the first item from the list as aid. Resulting in this:

    Step5: Player changes his/her mind again, and wants to use second item as aid. However he/she is unable because this does not work. Player is now very sad (like this cat).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Some of us are negligent in keeping C2 up-to-date. Could you post screenshots of the affected area? (highlight, right click and choose "Screenshot selection"; use control click as necessary to select areas)

  • gumshoe2029: I wasn't exactly sure regarding what you meant, so I updated my question with pictures. Hope they help.

  • LOL. Not quite. I mean in Construct2. In the events tab of your Layout where you are doing stuff. You can select the events (turn them yellow) by clicking (or control clicking on a number of them) and then right click (to get the menu) and choose "Screenshot selection") then you can Paste (control-V) this screenshot into Microsoft Paint and save the image and post it to a website like http://postimage.org/ for free and include the link here, so I can see what you are doing.

    [ img ] http://s13.postimg.org/en5zxics5/image.png[ / img ]

  • Gumshoe - here you go -

    Apologies for my misunderstanding. Hope this explains things a bit better.

  • The pictures are too small...

    I had a look in your code and I can't understand what is going on.

    Could you make more documentation about your code? Use Q to insert comment in the event sheet and tell what certain events should do.

    For example What is the meaning of variable 0 1 and 2? What are their purpose?

  • ikke2902 - reuploaded the code to dropbox. Hope I clarified things a bit.

  • Minjaware That definately helped and I found the problem.

    Asuming you have selected the third item "Freeze" and all other items has been bought.

    Now you select the fourth item "Slow", the following steps will be walked through.

    Global variable freeze will be set to 2 (starting from row 120 in Eventsheet). Note, at this state the global variable freeze and slow have a value 2.

    The eventsheet will be readed till the last event and there after it starts from the top. The next influental event occures in the group "variable is 2". Within that group the first met condition is freeze=2 (remember event sheets reads from top to down). This event sets globale variable "bridge", "long" AND "freeze" to 1!

    Now freeze is 1, the next condition where freeze should be selected will not be met.

    Same applies to other items.

    There is a point I would like to make. In row 115 you stated in the condition item=item_buy.item

    You don't have to use it. When you use on-touch-object condition, only the touched objected will be taken account to check the sub events.

    At the end, you should try to read like C2. Read the events from top to down. Perhaps you can find a solution now for your problem

  • Aha ... thanks . What might be a possible solution to fix it?

  • LittleStain - Thanks for the help .

    Here is the method I used to fix the issue: https://www.dropbox.com/s/utee9sockkxx8zc/shop.capx?dl=0

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)