RBuster's Recent Forum Activity

  • 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?

  • 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?

  • Try Construct 3

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

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

  • I need "choose" to go in the first field because the value would be the third variable. What I need is to randomly choose one of the two variables mentioned and assign the value of another variable to the chosen variable

  • Is it possible to randomly choose between two variables, the one that will receive the value of a third variable?

    I thought to use the "set value", but in the first field I can only select a variable instead of writing a command line, otherwise I could use "choose" for that.

  • Hi

    I have one more question on this same subject.

    Could I invert the values, for example, of positions 2 and 3, directly in the array or would I have to use a second array to determine the position where each of the values that I will be bringing from the first array will be stored?

  • Thank you very much!!!

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 12-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

21/44
How to earn trophies