How to buy characters then choose ?

0 favourites
  • 6 posts
From the Asset Store
2d warrior machrom platformer game character assets
  • hello i am trying to set a price for each character then the player after buying the character he will be able to use it.

    so what i did was 2 layouts: the first one character sprites if you click one it will show you a menu yes to buy and no to go back, so for the buying part it will subtract 100 gold from your total gold and it is subtracting then to choose a character you have to go to the 2nd layout to select what you bought but how to transfer the character to the 2nd screen. also for the the first layout i am stuck i kept clicking yes to buy but the menu wont go away even though coded it like this (gold>=100)do this(set menu and the bought char invisible).

    *if there is a better way please let me know.

    thank you guys <3

  • Hmm I would ask why can't you do it on one screen/layout ?

  • Hmm I would ask why can't you do it on one screen/layout ?

    buy the character then selecting it ? i am not sure how to do it T_T

  • You mean you have a shop and then a character select screen? It's more complicated than me just explaining how to do it. You can use global variables to decide if a character is locked or has been bought. Then on the selection screen you check if the variable is 0 or 1 maybe and that decides if you can select it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You mean you have a shop and then a character select screen? It's more complicated than me just explaining how to do it. You can use global variables to decide if a character is locked or has been bought. Then on the selection screen you check if the variable is 0 or 1 maybe and that decides if you can select it.

    selecting is simple but global variables to decide if a character is locked or has been bought is kinda complicated. so if global var = 0 char not bought and if it = 1 then char is bought ?

  • I guess. You can use that, or arrays which are more complicated. Global variables can provide a locked status.

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