How do I set text to a specific line from a google sheet?

0 favourites
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • I've rephrased my issue in the comment below and included a capx.

  • Is dop2000 still around by any chance? I actually used his tutorial and another one he sent me, so he might actually be able to help. Dop, if you're around let me know, I'll just share the entire capx!

    Here's the capx in case you or anyone else gets a chance to take a look, but basically everything else works! You choose whether to time yourself or beat the clock, you choose the suspect, type in your user name and submit. The info properly transports to Google Sheets. The problem is that when I try to read google sheets back, my text box keeps just outputting "O."

  • The problem is with CSV, I think it needs the header for the first column be empty. If you try CSV.At("Player Name", "Lesley") , you will see your score. So try removing "Player Name" from the google sheet. Hopefully, after that you could use CSV.At("Score", "Lesley") to retrieve the score.

  • dop2000 THANK YOU! That fixed it immediately! So, how do I move everything over, since there will be multiple users? I want it to pull the following data:

    User Name - Score

    User Name2 - Score

    etc.

    If I just use "Lesley," it's not going to work.

  • You can read all names and scores using "CSV -> For each row". Also, there is a bunch of expressions you can use inside this loop

  • Bless you. I've been beating my head on the desk for hours on this one!

  • dop2000 - I think the issue I'm still running into is that I'm not going to know what username a player enters in order to put it in the code. I tried with a global variable but it didn't work. Basically it's supposed to be a simplified leaderboard, where after the person finishes, they can see their name and 4-9 other players and what their finishing times were. I think I could do it if I could keep the entire first column blank? But I don't know how to do that using the tutorial you created.

  • Are you referring to this tutorial?

    construct.net/en/tutorials/sending-data-from-construct-23-to-google-spreadsheet-1447

    I think it should still work if you delete the header from the first column.

    Only the header should be blank, the column itself will contain names.

    Also you should probably send some unique player ID (a random number for example). In case there are duplicate names in the table.

  • So I changed it up a bit- when I did the below BEFORE adding a second text box that would show the player's name, the global variable worked. But now if I have one box showing the player name and one the score, the score just shows "O". I'm so close to getting it but I'm just missing something!! Thanks again for all your help so far dop2000 !

  • Actually now it's back to not working at all, not even pulling the score. Uggggh!

  • You can print CSV.TableToString to a debug text object, or to browser console. It will tell you if the data was actually received from the spreadsheet and if CSV plugin was able to parse it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Haha that's getting into way over my head territory. I may just be at a wall I can't get through. I really do appreciate all your time and help, though. You've been so great! Thanks dop2000 !

  • Here's the final capx one more time. dop2000 if you don't mind, can you give me a more step-by-step instruction of what you were saying? I'd really like this to work but I'm definitely hitting outside the limits of my knowledge.

  • Thanks! Ok so I run that, and it shows all the information is there down at the bottom. So why won't it update the textbox with that information?

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