Chadori's Forum Posts

  • In Local Storage, there is no more every tick checking for item existence because in Local Storage it will be a trigger and adding Every(X) seconds on the condition will be inefficient .But without that, It should be like this..

    --Without Regular every tick Item Check "Local key "Cont" exists (Efficiecnt)--

    *System -> Trigger Once

    --------->Local Storage -> Check Item exists("Cont")

    *Local Storage -> On Item exists("Cont")

    --------->System -> Set Global Variable Value "level" to LocalStorage.ItemValue

    --------->Sprite -> Set Animation Frame to 1

    --With Regular every tick Item Check "Local key "Cont" exists (Inefficiecnt)(Not a good idea but it is more like a WebStorage because of the regular every tick item checking)--

    In this case, I rather recommend finding a new way to check if Item exists like above or use variables to check rather than this method.

    *System -> Every(dt) Seconds

    --------->Local Storage -> Check Item exists("Cont")

    *Local Storage -> On Item exists("Cont")

    --------->System -> Set Global Variable Value "level" to LocalStorage.ItemValue

    --------->Sprite -> Set Animation Frame to 1

  • I also want to know about that too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are going to need to use the localstorage plugin for that. LocalStorage is a storage of keys with values and persist even when you load your game data, close or re-open your game.

    Try this tutorial:

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

  • I was wondering if Xbox One Games requires a HD resolution because I was making a SD resolution and might not be accepted? Thanks for the one who answers

  • UltimateArceus3 - In this situation you need the local storage to make you a backup of the value of the variable so that when you load a saved data, your variable can be updated by the backup from the local storage since local storage's aren't affected by saved data's.

    Example;

    You have a variable named "Health"

    And a local storage key named "Health_Backup"

    *System->On Load Complete

    ----->Get item --> Key "Health_Backup"

    *LocalStorage->On Item Get->Key "Health_Backup"

    ------> System->Set Global Variable Value-->Variable 1 to LocalStorage.ItemValue

    ------"That Should do it"------

  • Could you elaborate on what fundamentals your are talking about ?

    What I mean are the basic parts of writing code in programming. For example, in C++ all codes starts and ends in a bracket and almost all lines of codes end in a semi-colon. But in Construct2, it is very simplified that you don't need to worry about those things especially when the brackets or semi-colon are one of the beginners frequent errors in writing codes. In C2, it is as if we are writing a story in english and the computer understands it without errors but only unexpected events happens which is normal for beginners. With these features, I really think that Construct 2 can't really help in hastening learning in programming(coding), it won't make any difference in just learning programming(coding) directly. Although, C2 is more helpful in improving logical or mathematical thinking of people and understanding how programming works but not writing codes. But again only my opinion.

  • The first one looks more professional for a pixelart.

  • HessamoddinS - I am not sure but it might not be a bug. It might just be a floating-point inaccuracy. But I manage to find a solution, changing the angle of the tiledbackground from 0 to 180 or -180 or changing it's size from 20 to -20. It's not really a serious problem, only needs some workaround.

  • Wishy - Save File is not connected to LocalStorage, Arrays or any plugins. I think I am starting to get your point. What you need is a boolean or variable that tells your game that if your game is updated and overwritten. Actually the event above will actually help and I will modify it below:

    -Make a global variable named "Has_SavedFile"- with number value of 0.

    -Make a global variable named "Version"- with number value of 0.

    -Make a LocalStorage Key named "Version"-

    -Make a LocalStorage Key named "Has_SavedFile"-

    *On start of layout

    ------> Local Storage.Check Item Exists ("Version")

    ------> Local Storage.Check Item Exists ("Has_SavedFile")

    *LocalStorage on Item Exists ("Has_SavedFile") or * LocalStorage on Item Set ("Has_SavedFile")

    ------> Set Global Variable "Has_SavedFile" to LocalStorage.ItemValue

    *LocalStorage on Item Exists ("Version") or * LocalStorage on Item Set ("Version")

    ------> Set Global Variable "Version" to LocalStorage.ItemValue

    \\*Let's say that the new game update version is "1". If the key "Version" is only available in the update, the key "Version" will be 0 in default**On Item get ("Version")

    *Start of Layout & *If Global Variable "Version" < 1

    \\*Detach the save file of connection with your game until it is overwritten by a new one.*\\

    ----------> Set LocalStorage Key "Has_SavedFile" to 0

    \\*Update the values*\ ---------> Set LocalStorage Key "Version" to 1

    *If Global Variable "Version" = 1 & On Save

    ----------->Set Local Storage Key "Has_SavedFile" to 1

    *If Global Variable = 1 & *Global Variable "Has_SavedFile" = 1

    ------------> Enable Load Button

    *If Global Variable is not equal to 1 & *Global Variable "Has_SavedFile" is not equal to 1

    ------------> Disable Load Button

    The trick here is to deactivate the load button if the game is updated and not yet overwritten by another saved state. Hope that finally helps.

    If my event above isn't clear then I can send you a .capx if you like.

  • glerikud - I am only self-taught, it was more comfortable for me that way.

  • Wishy - Correct me if I am wrong. From my understanding, you said that you have global objects + saved state. And that the global objects were saved in a saved state that was saved periodically. And Global objects are reset when app is closed. Therefore, everything is changed or reset when you re-run the app except if you re-load a saved state. So therefore, you need to overwrite or cut ties with a saved file you made when updated and since when you update an app it is needed to be closed for update so the global objects are reset.

    Aren't Global Objects cleared when app is closed and are only recovered when loaded by a saved state. So you need to cut ties or overwrite the saved file. Hope that helps.

  • grigrizljac - Sadly, HTML5 doesn't have enough permission to run on background while the application is closed.

  • Wishy - Sorry. I guess I misread. You can take over from here then.

  • grigrizljac - This isn't possible according to Ashley here: https://www.scirra.com/forum/how-do-i-run-the-game-in-background-crosswalk_t122089 but I do know that in the Audio Plugin Properties, there is an option to play music in background.

  • Geforio - You don't need to read the GooglePlay instruction in adding GooglePlay Games in your games since C2 does the work for you. First, you need to know what compiler you are going to use in your game.

    If you use IntelXDK to compile your game then you are going to need Cranberry Plugin (Scirra Store: https://www.scirra.com/store/construct2-plugins/construct2-cordova-plugins-1662 or cranberrygame website http://cranberrygame.github.io/request_construct2_cordova_plugins/ which is a paid plugin.

    then read this to learn how to do the events:

    https://www.scirra.com/manual/175/google-play

    also read this guide for compiling:

    https://www.scirra.com/tutorials/4864/how-to-install-cranberrys-google-play-games-plugin

    You also need to download the build/compiler program:

    https://software.intel.com/en-us/intel-xdk

    But If you want to compile to Cocoon.IO then AndreasR 's tutorial will help you.

    https://www.scirra.com/tutorials/1010/google-play-games-leaderboard-achievements

    The Cloud Compiler website:

    http://cocoon.io/