RBuster's Recent Forum Activity

  • I made some modifications to the file and added some commands that were missing, but the problem still persists.

    we.tl/t-98Wtgf2G9v

  • Exactly. I need the code to work when like using a button (adding information always at the top and moving the previous lines to the bottom). I don't understand why the simple fact that I take the action off the button and use another event, interrupts the process.

  • I actually made some changes to the code to display the lines from above and also to include the lines as the playing time runs out, instead of using a button for that.

    I decided to change the example you shared with me to illustrate the problem I am having. I would appreciate it if you talked to me about the problem rather than just solving it. Is that possible?

    we.tl/t-ytGgx9bh87

  • I had already tested calling the function through the button and it worked, but I need a game action to call this function and what happens is that instead of skipping the lines, the program always writes the new score on the first line, overlapping the previous information.

    From what I understand, from watching the code, maybe this happens because the width of the array is being used as a reference to add new lines. What do you think?

  • I wonder if it's not possible to use a function instead of a button to add data. I did a test and it always only writes to the first 4 fields (first line)

  • Thank you very much!

  • Thanks a lot for the example. It is now clear what you explained earlier.

    I can then store the whole array in local storage and each time the game comes in I must populate it with the array information and then insert the new data according to the new scores, right?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I really can't understand things without examples. I appreciate your help so far. Thanks.

    Let's see if I can get some help from someone else.

    I tried this code:

    On function 'populateArray'
    -> Array_Score: Set value at (0, 0) to Score_Date
    -> Array_Score: Set value at (0, 1) to Score_Rights
    -> Array_Score: Set value at (0, 2) to Score_Wrongs
    -> Array_Score: Set value at (0, 3) to Score_Level
    -> Array_Score: Push front Array_Score.At(0,LoopIndex) on X axis
    -> Array_Score: Delete index 5 from X axis
    ----+ System: Repeat Array_Score.Width times
    -----> Score: Append LoopIndex+1&" - "&Array_Score.At(LoopIndex)&newline
    

    I don't understand why it doesn't display all columns of the first row of the array.

    I already tried this code too:

    On function 'populateArray'
    -> System: Set arrayData to str(Score_Date&" "&Score_Rights&" "&Score_Wrongs&" "&Score_Level)
    -> Array_Score: Push front arrayData on X axis
    -> Array_Score: Delete index 5 from X axis
    ----+ System: Repeat Array_Score.Width times
    -----> Score: Append LoopIndex+1&" - "&Array_Score.At(LoopIndex)&newline
    

    I only got the 1st line with this code but it doesn't seem very natural for me. I believe the right thing was to handle this directly from the array

    Could someone explain to me what is wrong or missing?

  • Thanks again.

    Yes, I intend to use this solution to store data. In this case, I will store the entire array in the local storage, right?

    You said I can use the array coordinates to store the information, but how can I do that? I believe that if I have 4 columns I have to use "Y" coordinate but from 0 and keep this position in the X coordinate for all the information to be at the top of the list (like this: (0,0/0,1/0,2/...). Is that right? If you

    Understanding this is the most complicated for me until now. If you could post a pseudo code here I think it would illustrate this very well.

  • Thanks.

    I have some questions:

    - I need to have 5 rows and columns corresponding to the data I want to show, right? In this case, it would be date/rights/errors/level

    - Do I need to store the array data in variables or simply pull these data from the array and display them in order whenever I show the score?

    - Should I always populate the array at the end of the game and then use local storage to store this data on the user's machine? how would the data be updated in local storage?

    - How to store array data in the local storage? Storing the data in variables first?

    The biggest question I have is how to include 4 different pieces of information (date/rights/errors/level) in the array.

    EDITED***

  • I need to display the last 5 results of a game, for which I was thinking of using the local storage for this, which includes the date, level, amount of right and wrong points, and the time in minutes referring to the duration of the game. I tried to solve this by accessing some tutorials and I saw that I will need to use an array for this, but I don't know how to include this information in it so that it is displayed on the screen and how to manage it. I don't need to sort the results for the highest amount. Just show them in play order. Could anyone help me understand how to do this?

  • Thanks for the suggestion. I will do it.

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies