AndreasR's Forum Posts

  • Thanks that really help me to sort out my problem & confusion tooo !!!

    Glad to hear that You're welcome!

  • I made a little tutorial to explain the use of the LocalStorage plugin.

    https://www.scirra.com/tutorials/1461/h ... age-plugin

    Let me know if I missed something <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • I made a tutorial for LocalStorage <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    https://www.scirra.com/tutorials/1461/h ... age-plugin

  • > Using local storage is the easiest way and should work something like this:

    >

    > local storage set Item key = "PlayerCoins" value = (the name of your GlobalVariable)

    >

    > on start of layout - local storage get Item "Playercoins"

    >

    > on item get "Playercoins" - set GlobalVariable = int(localstorage.itemvalue)

    >

    Thanks for quick refrence that helped me a lot .....

    so is playercoin a variable or integer or key ? as you want to set the global variable score to it am i right ?

    So if possible could you just report the same code using the table reference if possible as it would help me to understand much easily .

    also I think this two statement should be called in start of the layout .....

    local storage set Item key = "PlayerCoins" value = (the name of your GlobalVariable)

    local storage get Item "Playercoins"

    so is it necessary to call them randomly or just in a order to get the value of globalvariable to key playercoin ?

    I made an example here. Just download it from my dropbox account

    https://www.dropbox.com/s/iz8cvjw86vfh8mm/local_storage_playercoins.capx?dl=0

    This should answer your questions

  • > Using local storage is the easiest way and should work something like this:

    >

    > local storage set Item key = "PlayerCoins" value = (the name of your GlobalVariable)

    >

    > on start of layout - local storage get Item "Playercoins"

    >

    > on item get "Playercoins" - set GlobalVariable = int(localstorage.itemvalue)

    >

    I got this working but still not getting two points .....

    As why are we using key to store the same value as in global variable & what is itemvalue used for ?

    You must imagine the LocalStorage as a Table. The key is the ID and the value is the value of your saved variable.

    LocalStorage

    So you can save each variable individually or you can save all variables in an array and then the array via asJSON into the localstorage.

    In order to load the saved item at a certain key you need to run 'Check item exists (your key)' -> If key exists -> Get Item (your key). Then the value of the fetched key can be set to the variable by 'LocalStorage.ItemValue'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the file! Will definitely try to implement it.

    You're welcome Don't hesitate to send me a PM if you stuck or need help! Glad to help you out then.

    Regards

    AndreasR

  • Update Information

    The game 'Angry Aliens' has been updated to version 2.0. Please download the latest package from Scirra. Buyers will be notifed by mail.

    Changelog

    The changelog can be found here: Changelog

    Bugs & Support

    If you should face some issues or bugs don't hesitate to send as a mail! I will fix it ASAP!

    Any Suggestions?

    You are still missing something in the game? Just let us know and I will consider to add it with further updates.

  • Hi, I referred to it. But it didnt state anything about global variables. I tried that method. But it doesnt work. I have also included the Eventsheet of globals in the event sheet where the save occurs.

    If this doesnt work, then can I use Local Storage to save and retrieve each variable?

    If you want to save just one variable you can do this like the way mentioned above. But if you want to save more than 1 variable I would prefer to use an Array and save it asJSON in the LocalStorage.

    I made an example file if you don't know how to handle that.

    Local Storage

    I'm currently updating all my games using WebStorage to LocalStorage. I will release a LevelSelection working with LocalStorage instead of WebStorage. If you have any question feel free to send me a PM.

    Regards,

    Andreas

  • mindfaQ

    Do i set all under one key in LS?

    How do i then delete the expired items from local storage?

    Hi irina

    I realeased an example showing you how to setup the LocalStorage plugin for save strings (like the player name) or numeric variables like the HighScore via an array (asJSON).

    It's currently on sale, so feel free to check it out here

    Game Template 8 - LocalStorage

    If you miss a function don't hesitate to contact my. Then I'll add it

    Regards,

    Andreas

  • Game Template 8 - Local Storage — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/game-template-8-local-storage-973

    <h3>Description</h3><div class="deshr"></div><p>This is an .capx example showing you how to save number variables, like HighScore, and string variables, like the player name, into the new Local Storage plugin.</p><h3>Features</h3><div class="deshr"></div>

    • Save numeric variables (for HighScore)
    • Save string variables (like player name)
    • Well commented .capx file
    • Free Updates & Support

    <h3>Suggestions?</h3><div class="deshr"></div><p>If you think the item misses something don't hesitate to let us know!</p>

    Use this topic to leave comments, ask questions and talk about Game Template 8 - Local Storage

  • Please fix the Demo Link.

    Hi

    Thanks for the hint. The demo is back online.

    Demo: Slide Menu

    Regards

    AndreasR

  • Hi,

    This is exactly what my Game Template 7 is doing <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    You can check it out here: https://www.scirra.com/store/royalty-fr ... ection-885

    It saves the highest score for each level and shows it on the levelselection screen.

    Regards

    Andreas

  • Made a game from one of your started game at the free asset

  • Pixel War - Platformer — Now for sale in the Scirra Store!

    https://www.scirra.com/store/games-with-source/pixel-war-platformer-884

    <h3>Description</h3><div class="deshr"></div><p>Pixel War is a tilemap-based platformer. Jack wants to save his lovely princess, but he will note make it alone. So will you help him?</p><h3>Mission</h3><div class="deshr"></div><p>You'll need to find the 6 potions to turn back your princess. The potions are located in the 12 levels, so go and find them!</p><h3>Features</h3><div class="deshr"></div>

    • Built with tilemap (tileset included)
    • Optimized for Desktop/HTML5
    • Rain Effects (1. level)
    • Level Selection with record per level
    • Expandable
    • free update and support!

    <h3>Questions?</h3><div class="deshr"></div><p>Don't hesitate and ask us :)</p><h3>Try the Demo</h3><div class="deshr"></div><p>Use the following link to play the game!</p>

    Use this topic to leave comments, ask questions and talk about Pixel War - Platformer

  • Game Template 7 - LevelSelection — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/game-template-7-levelselection-885

    <h3>Description</h3><div class="deshr"></div><p>You'll get an enhanced LevelSelection menu with following features.</p><h3>Features</h3><div class="deshr"></div>

    • Displays the record of each level at the LevelSelection Layer
    • Add as many levels as you want!
    • Well commented capx file
    • Levelnumbers using a Spritefont
    • All used graphics are included (.png only)
    • Free support and updates

    <p>Feel free to implement this levelselection in any of your projects (privat or commercial), but note, you need one license (= one purchase) for each project. Save by purchasing license bundles!</p><h3>Support & Questions</h3><div class="deshr"></div><p>Buyers will find an URL for Support included in the package. For pre-sale questions, please use the comment area.</p><p>Thank you!</p>

    Use this topic to leave comments, ask questions and talk about Game Template 7 - LevelSelection