[partly solved] How do I do some kind of a timestamp/news

0 favourites
  • 8 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi,

    I'm not sure how to do this (a reason could be that I'm not an expert in Arrays). I also searched in the forum, but I didn't found anything similar. Maybe somebody can give me a hint.

    1. Step

    My program makes every specific time period a calculation and gives a result.

    These results should be saved in an array with a timestamp. That means take the results, add a new y-line in array, put the result in and save it with the game-time. (e.g. time: 123 - result1: 12 - result2: 343 - result3: 1253)

    2. Step

    The results won't be shown everytime when the calculation is made.

    There is an icon which opens a pop up and shows the first array result. The player confirms and the next will be shown, until there is no one. The results/news which the player confirmed will be deleted, so it won't show again.

    I'll try to do this, but maybe somebody has an idea.

    many thx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you asking how to do all this or just the time stamp ? If it's just the timestamp then look at wallclocktime or there is a plugin that makes handling time easier (see plugin section)

  • the timestamp is not really the problem. it's the array which gives me headache.

    insert it, show it and delete it... sounds easy, but somewhere I make a mistake.

    I will retry it and if it works I will post it

  • I don't do much with arrays. This might give you an idea on how to proceed

    https://goo.gl/kJEBPW

  • ok, small steps.. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I made a small example, where a new line will be added and values will be saved.

    http://1drv.ms/1UNA6yt

  • edit of your capx

    https://goo.gl/wQW4KI

  • Hi,

    ok all mistakes corrected and now it's working like I wanted

    Description:

    2D-Array, a new Y-line will be created, the oldest value will be shown and if accepted, it will be deleted

    http://1drv.ms/1UNA6yt

    RamPackWooble Version - (Thank you for your sample/help)

    1D-Array, new X-Variable will be created, the newest value will be deleted

    https://goo.gl/wQW4KI

  • ok, I have a small problem:

    When I first time add a new line, 2 were added: 0 - 0 - 0 and e.g. 2-12-13. After that it works just fine and add every time just one line.

    So i tried to set the size (set size weight 3, height 1, deep 0), but then it enters 0-0-0.

    Has anybody experience with my problem?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)