How to make the app partially locked and partially unlocked ?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Partial Locking of app
I'm assuming you mean you have multiple levels and you only want players to access some of them and then the rest will become unlocked either through play or by upgrading.
If that's what you mean, there really is no "easy" answer because a lot depends on how your game is structured.
But assuming you have levels and the levels are numbered and you want to start with 2 levels unlocked you could do something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | currentLevel = 1 maxUnlockedLevel = 2 ... -- then later in your code.... if currentLevel <= maxUnlockedLevel then -- let them play else -- prompt to upgrade end ... -- or if you want to reward them with a new level after completing one... -- end level code if currentLevel == maxUnlockedLevel then maxUnlockedLevele = maxUnlockedLevel + 1 currentLevel = currentLevel + 1 end |
Thanks for the solution.Say for Example I have 10 Levels and I want to unlock only two and the rest of 8 to be locked.And I want the user to pay for the rest of the 8 Levels and then unlock all the levels?
I have a Question that what i have to do in
1. Programming part
2. While uploading in Apple Store..
3. Do I have to do anything Special or it is the normal way.
4. How to add price for the unlocked Levels.
Well its the same basic logic. You have a "locked" flag
local isLocked = true
if playerPurcahsesFullGame then
isLocked = false
end
However, how you go about dealing with the player unlocking the game is a whole different ball of wax. You have to get in-app purchases working which is a bunch of iTunes connect setup, making sure your app is enabled for IAP, having a test account to test your purchases.
Part of that setup is you hve to provide a screen shot of your store to Apple before they will enable your items for testing which also involves submitting your app to apple even though its not done or working, the immediately rejecting the binary. There are several threads in the forums on people and their struggles to get IAP setup.
In your code, if you're going to use IAP (as opposed to a lite version and getting people to upgrade to a full version -- which Apple doesn't really want us doing any more...) you have to track if the player has bought your upgrade and since they can delete the app and any files you might have saved, you have to restore any purchases when the app starts up.
It's a complex question.
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
Resolutions on the devices, can someone help me understand?
Retina display sizes for Android
Why object pass through a line which is a static physics object
CPM in Mac App Store
Performance question regarding transition.to
Corona 2.0 Beta 4 now available for download
Designing Softwares
Tile image help
Joypad SDK in Corona SDK?