randomly's Recent Forum Activity

  • I'm sorry if I was not particular enough, if you got any questions, I'll happily provide the answers for you.

  • Oh wow, the rotations will help a lot, e.g. for rotating coins, thanks very much!

  • Replace this condition (direction = -1) by the System Condition "Else".

    What's happening now, is that as soon as you are pressing space and direction is 1, direction is changed to -1.

    Then, the system moves to the above displayed condition, realizes that direction is now -1, triggers the condition and immediately changed direction back to 1.

    Using Else prevents this from happening.

  • I'll PM you if I do.

  • So happy this is still being updated.

  • The process of getting a value from the LocalStorage:

    • Action: Check item [key] exists
    • Event: On item [key] exists -> Action: Get item [key]
    • On item [key] get -> (now, the value is available under the expression LocalStorage.ItemValue)

    Also, as soon as the event On item exists, you know that the key exists. If On item missing triggers, that means that it doesn't exist.

    Here is an example .capx in case you are stuck: Download

  • [quote:3v3o2ju3]Is there another way to keep track of time played across the app being closed?

    Yes, I recommend rexrainbow 's TimeAway plugin.

    It works with the Local Storage, but saves you all the tedious saving and loading.

    This won't work for the total time in the app though, obviously.

    ________________________________-

    [quote:3v3o2ju3]Is there another way to store numbers besides Local Storage

    If you want your app/game to work offline and don't want to work with the system time, you will have to work with locally saved files.

    Apart from LocalStorage, there is also the possibility of saving, loading and parsing files with NW.js & AJAX.

    This will be more complicated, but will also give you more freedom when it comes to the workflow.

    __________________________________________

    [quote:3v3o2ju3]but say they uninstall and then re-install the game, the Key is missing

    That's the way, LocalStorage works. The keys/values saved by LocalStorage are part of the app, so they get deleted as well if you delete the app.

    If you don't want to work with online servers and you are not on mobile, you could use the registry, but apart from that, I don't know about any other ways of saving and keeping values even when the app is reinstalled.

    (That's just me though, there might be others out there who know better)

    ___________________________________

    [quote:3v3o2ju3]Like where its supposed to update the global variable with the Key value it says NaN

    As mentioned above, when uninstalling the app on mobile, the LocalStorage keys will be deleted since they are stored in the same location as the app.

    NaN in connection with LocalStorage will appear when there is no data available. (Or if you try to combine strings and numbers, but this doesn't seem to be the case here)

  • Or add a Timer behavior to the gun (or any related object).

    Start the timer when the reload is initiated.

    When the timer is finished, the reload is finished.

  • This depends heavily on your game and how it works.

    For example, shifting the difficulty in a Tower Defense game will be different to a Jump & Run or Shoot 'em Up.

    There is no general way that is applicable to all kinds of games.

    Usually, you can increase the enemies health, damage, etc (basically stuff that is bad for the player) and increase stats that are beneficial for the player (like his health).

    But for more detailed tips, you will have to provide us with more details of your game.

  • The way LocalStorage works is the same as Dictionaries work:

    Each key can only exist once.

    This means, that if you write to an existing key, it will always overwrite the current value.

    This is the way it works and can't be changed.

    There is a workaround though:

    • When the app is started, get the current value from the Local Storage
    • Save the value to a variable and increment the variable regularly, as desired
    • In regular intervals, or before you quit the app, save the variable as the value of the Local Storage key
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm surprised that nobody replied yet.

    I find this plugin useful. It may not be a huge change, but it helps, especially the string lists.

    Thanks for your effort!

  • Either use CSS or use a TextBox plugin like this one.

randomly's avatar

randomly

Member since 26 Sep, 2016

Twitter
randomly has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies