[Solved] Firestore Help - Pull from Firestore

Hello, I was wondering if there was a way to pull my variables from Firestore rather than saving them as scene variables(I am building a trivia game).

This is how my scene variables are organized.

Here is how the scene is loaded, and an example of an answer spot.

Basically, how could I pull from here.

To give me the same result as pulling from the scene variables? - It will be a lot less hassle to pull from Firestore, I just can’t figure out how. Until then, I’m wary of adding more than 10 questions per category due to lag and how long it takes.

Here is the link to the game too, bearing in mind I just started here a week ago.

Thank you everyone for your help.

Maybe a bit like that

Im trying with a super slim version of your code(and I tried your code) but neither work.

I also changed the document name to 0

Ah sry, I clicked on an action too low.
We need the “Get a field of a document” firebase action.

I’m still getting nothing. I’m expecting the two text elements to change. One to change to the string value of the Question field in firestore, and the other to change to “ok” because the data has been received. Am I still doing something wrong?

I think the permission rules in firestore could be the problem.
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /History/{document=**} { allow read, write: if true; } } }

I changed it to just that, and it still is not working. It said I had 54 reads today, so I doubt it’s the rules. Maybe the data structure isn’t coming in as as string?

The variable type doesn’t matter in this case.
For me it works like this.

1 Like

You’re helping me so much, thank you. When I change my events to mirror yours results come back as 0 for both, it never pulls anything. I rechecked everything! This is a nightmare.

Hm. The API key is inserted correctly in the GD project?

1 Like

Yes, I think it’s a rule problem though, I just tried this rule playground thing using the code you sent.

And here it is with the original code. Yet it still does not work.

My god…

I found a semi colon after the }
It was the only thing that wasn’t in copy and paste, once I removed it…it worked.

1 Like

No, you just wrote history, not History :wink: