In Game Store, With Coins , IAP to purchase coins , Earn coins , Buy Characters , Equip and Unequip

Here is what I have:

An app.

A Flappy Bird Clone.

I want to add an in game store that uses a coins system and the coins can be earned through going through each pipe.

I want it to have the option to buy coins with in app purchases (Also can this work with android and ios the same iap???) and buy different birds. Also have an equip and unequip button so they can equip a bird and then the button changes to unequip.

Please help, pictures of what to do would really help me.

Thanks

Comments

  • jigglybeanjigglybean Member Posts: 1,584

    How to build a store

    Search GS helper videos, it will also show you how to add a money system to your game

    Like Balls? Then click here! We've 100 coming soon

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    @jigglybean said:
    How to build a store

    Search GS helper videos, it will also show you how to add a money system to your game

    I've already tried that and it doesn't help, I need the character to be purchased with coins and be equipped that video only shows how to set up the buying feature :(

  • jigglybeanjigglybean Member Posts: 1,584
    edited April 2014

    But thats what you need to set up. Use some paper or write stuff down for what you need to sell on the store - be it items, characters, weapons etc.

    You will need to create your money system first like in the demo. On the character you want to be able to purchase, you can create a boolean for a true/false attribute.

    So if Player X buys Character for 500 coins, set to true. Its all about trial and error, thats what I did in the end for one of my games.

    But I am actually using tables to control the items.

    Image and video hosting by TinyPic

    Here is an example of the table. item followed by the purchase price

    Image and video hosting by TinyPic

    http://i60.tinypic.com/33o3xjl.jpg
    This shows you the rules I set up. Game.coin is my currency so everything is focused around that.

    This also helps prevent a player buying something if they don't have enough money. You will need to create an attribute for your game money and tag it to game.coin for example.

    Like Balls? Then click here! We've 100 coming soon

  • deadbeatdeadbeat Member Posts: 14

    make a new table with two columns and as many rows as you need. Make two boolean attributes called bought and equipped. Then make a rule saying if Attribute coins is greater than or equal to (price of bird) AND touch is pressed change table cell value bought AND eqipped to true and change attribute COINS to COINS-(price of bird). then make 6 new attributes on your playing bird. Constrain these attributes to the equipped column of the table. then make a rule on your bird saying if table equipped for that specific bird is true ( do this via the constrained attributes) is true change attribute self.image to desired image.

    NOTE: if you want only one bird image to be equipped at a time, then make a rule in the scene saying if table boolean equipped (do this via the constrained attribute) is true change the other table equipped booleans to false.

    whoops i forgot : Place a button called equip at the side of the bird or somewhere and make a rule saying if table boolean bought is true (do this via the constrained attribute) and touch is pressed, then change table cell value equipped to true.

    Ive atriculated this terribly and if by some miracle you understand the point im trying to make then let that be the day i fly.

    Ill probably end up dooing a simple template for you

    deadbeat

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    @deadbeat said:
    make a new table with two columns and as many rows as you need. Make two boolean attributes called bought and equipped. Then make a rule saying if Attribute coins is greater than or equal to (price of bird) AND touch is pressed change table cell value bought AND eqipped to true and change attribute COINS to COINS-(price of bird). then make 6 new attributes on your playing bird. Constrain these attributes to the equipped column of the table. then make a rule on your bird saying if table equipped for that specific bird is true ( do this via the constrained attributes) is true change attribute self.image to desired image.

    NOTE: if you want only one bird image to be equipped at a time, then make a rule in the scene saying if table boolean equipped (do this via the constrained attribute) is true change the other table equipped booleans to false.

    whoops i forgot : Place a button called equip at the side of the bird or somewhere and make a rule saying if table boolean bought is true (do this via the constrained attribute) and touch is pressed, then change table cell value equipped to true.

    Ive atriculated this terribly and if by some miracle you understand the point im trying to make then let that be the day i fly.

    Ill probably end up dooing a simple template for you

    deadbeat

    Do you mean make a table with 2 columns and use two real attributes called bought and equipped? Boolean is just true and false.

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    Anybody?

  • jigglybeanjigglybean Member Posts: 1,584

    We can't spoon feed. You just need to dive in and have a play. I've outlined the code in those images to help. Roll up your sleeves and get stuck in. FYI, I used the same video to set up my building blocks for the store

    Like Balls? Then click here! We've 100 coming soon

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    @jigglybean said:
    We can't spoon feed. You just need to dive in and have a play. I've outlined the code in those images to help. Roll up your sleeves and get stuck in. FYI, I used the same video to set up my building blocks for the store

    Alright I've read your PM, I will delete my current table and get stuck in.

  • jigglybeanjigglybean Member Posts: 1,584

    Its the only way to learn. :)

    Like Balls? Then click here! We've 100 coming soon

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    I have an issue, I've set it up so every character has the attribute that when it collides or overlaps with a coin it adds a coin to the money system but when the game resets and i go to the store, the coin display shows it as 0.

  • jigglybeanjigglybean Member Posts: 1,584

    You need to save the money either in a table or an actor.

    Your code would be something like

    When ACTOR overlaps/collides with game.coin - CHANGE ATTRIBUTE game.coin to game.coin+1(or the value of your money)

    Save attribute - game.coin to COINACTOR

    Then you need to make the change in the table the same way you did with the items in your store.

    At your splash screen you MUST add this coinactor off screen with a Load attribute for your money system(the key) It will then load the money up

    Like Balls? Then click here! We've 100 coming soon

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    @jigglybean said:
    You need to save the money either in a table or an actor.

    Your code would be something like

    When ACTOR overlaps/collides with game.coin - CHANGE ATTRIBUTE game.coin to game.coin+1(or the value of your money)

    Save attribute - game.coin to COINACTOR

    Then you need to make the change in the table the same way you did with the items in your store.

    At your splash screen you MUST add this coinactor off screen with a Load attribute for your money system(the key) It will then load the money up

    Thanks again dude, I feel like such an idiot. I've had the save attribute only working in game over so when the collision happened it was changing the game.coins but not even saving lol.

    Thanks.

  • jigglybeanjigglybean Member Posts: 1,584

    happens :)

    Like Balls? Then click here! We've 100 coming soon

Sign In or Register to comment.