bpblegendary's Forum Posts

  • 3 posts
  • I have a game that will eventually be set with in App Purchases where you can purchase multiple ship sprites to use as pawns in the game. Play the game if ship is destroyed one ship is removed from the number of ships owned. It works well until I close the game and reopen and then all ships return to 0. what is the best way to store data like this?

  • Yes! that was the problem. Thank You! NOW of course the pickle is to make all of the variables for the game play reset on restart of Layout. I guess I need to either reset them individually or make them locals. I see a lot of people referencing Local Variables are these not included in the free version? I cant seem to find them in the "Add" drop down window.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello! I am working between three separate Layouts just to try out the Engine before purchasing. Layout 1 is the game play It has a space ship that can be destroyed. Layout 2 is a Home screen that gives you the number of ships you have left and the number of coins you have earned in play to possibly buy ships with. (working up to an eventual "In App Purchase.") Layout 3 is a market place for buying ships with coins. I havn't really worked in coins yet I simply have it set up so that The Start Button for Layout 1 cannot be clicked unless Number of Ships is greater than 0. There is a bttn sprite for a Market Place and an emty ship sprite with a Text box set to "x"&NumOfShip(A global variable.) I click on the go to Market Bttn and it takes me to Layout 3 where If I click on a ship sprite it adds 5 to the global variable NumOfShip. I return to Main Mentue via another Sprite Bttn attaching L3 to L2 and I see that the Text Box has gone from "xO" to "x5". Awesome that seems to work fine. I hit the play again bttn It now takes me to Layout 1 I play one game. A ship is destroyed(I set up an Action to subtract 1 from the NUmOfShip var on destruction of the Ship.) The game ends I'm back at the home screen and my ship text says "x0" Wait! 4 ships went south! Obviously this will not work if I ever buy a plan an add In App Purchase. People will certainly be very angry with me. So I need to know how to stash/save a variable like number of coins or number of plays left before purchase needed, so that It doesn't reset on every restart of the Layout. Oddly it doesn't reset going from Layout 3 to 2. It seems to only reset between the home screen and the Game Scene or maybe vise versa. Obviously there is a way to do this I just cant seem to find it.

  • 3 posts