AndreasR's Recent Forum Activity

  • Hi firezombie444

    What plugin did you download?

    I'm using cranberrygame 's plugins and the work fine. Just download the plugin, unzip it, close C2 and create a new folder witht the plugin name at /install-path/Construct2/exporter/html/plugins/...<YOUR NEW FOLDER>

    Then copy the content (..js files and so on) in this folder.

    Then open C2 and it should work

  • For all German Construct 2 developers, I'm building a german knowledge base for C2 Developing.

    Link: Wissensdatenbank

    Contribute your tutorials & tipps here: Contribute

    The knowledge base is open for all (no registration, no fees...). But if you have a free account you can publish your own C2 stuff like tutorials, tipps & hints and so on.

    I'll give my best to keep it up to date, every help is highly appreciated!

    To motivate some german developers I will give away free redeem codes from my seller account for everyone publishing at least to posts (for example)

  • Will this work when exporting to mobile or is it just for web?

    Hi,

    You'll find a version for exporting with Cordova, so it will work for Mobile games, but not for Web Games (HTML5).

    I'm also working on a version for CocoonJS. I probably will update the package this weekend.

    Regards,

    Andreas

  • AndreasR Ok, thank you. It's the AJAX part that I'm not sure about. How to put it on my server and how I make it readable for the game. Haven't tried to do this type of stuff before. So I'll have to look more into it and see how it works. Is it complicated?

    Well, this depends on your ability and knowledge of AJAX and PHP.

    I'm not a webdeveloper, so I have no clue about that stuff. I always contact freelancers to do such jobs.

    Basically you just need to send this code via AJAX to your server (where the php file is located processing the information).

    URLEncode("data[]") & "=" & URLEncode(str(projectversion))[/code:3698jynl]
    
    The problem will be the php file. I'm not a webdeveloper. But I guess some talented webdevelopers are among us here in the forum
  • Hi,

    You can compare the value of your Projectversion by setting a variable to 'projectversion'. Then send this to your Server (via AJAX) on the start of the layout and compare this value with the latest version your game is running on.

    Then you can either inform your player about a new version or not

    Regards

  • Oleeeee!!!!

    Thankssss

    You're welcome

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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'.

  • 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

AndreasR's avatar

AndreasR

Member since 21 Feb, 2013

Twitter
AndreasR has 6 followers

Connect with AndreasR

Trophy Case

  • 11-Year Club
  • x11
    Popular Game One of your games has over 1,000 players
  • x17
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies