How Do I Save/Load Written Text In A Textbox So All Can See?

0 favourites
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hello all,

    How do I save/load any written text in a textbox of clues, using JSON and firebase, so that every single user can load and read them? I want to create a multiplayer puzzle and clue game. I have a question though.... How do I, save, categorize, and load text (that is written by users while playing the game - like reading a "book of clues - all the clues in the book are text left behind by past users"), in Multiplayer?

    Here's what I have so far...

    https://www.dropbox.com/s/i6x31ktpzn9aq ... .capx?dl=0

  • Bump.

  • Bump.

  • Please... I really need help with this one. This is my dream game:)!

  • Are you able to create this system locally for a single player?

    Write, save, and load messages using your preferred data structure. An array would be suitable.

    If you can do it locally, send the entire array or dictionary object as json to a firebase/database key which all your users can access. Everyone user will download and update the same data on your database server.

  • Thanks That cleared up a lot.

  • To answer your question though... I'm trying to make a multiplayer game, in which every user can instantly read ant new "clues", or any new pieces of text, written in the textbox. Like a forum with categories and topics, and area to write paragraphs of clues.

  • Are you able to create this system locally for a single player?

    Write, save, and load messages using your preferred data structure. An array would be suitable.

    If you can do it locally, send the entire array or dictionary object as json to a firebase/database key which all your users can access. Everyone user will download and update the same data on your database server.

    Hey oosyrag -- and ASHLEY. Turns out, I don't know how to save textbox messages locally with dictionary and JSON... I tried to figure it out by myself, but I can't find any good tuts on how to save and retrieve the text from a textbox. Could you (or someone else) guide me in the direction a decent tutorial?

  • Bump.

  • The textbox.text expression will get whatever is written in the textbox when saving, and the textbox set text action can be used when loading.

    How exactly you want to format the data is up to you.

  • Hey Can you check out my capx? I already did that, but when pressing 'debug', to check out if the key was working, it wasn't.... I used the textbox.text expression, but I don't see it saving anything happening. Also, I don't know how to load/retrieve and read the stored data/text. Can you show me what I'm not doing, or doing wrong?

  • Your event to add the dictionary key is on its own event sheet that is not included or linked to your layout. So it doesn't run.

    If you go to your layout properties and change the event sheet to NewCluesTextBox, it works fine.

    To load, on trigger - set textbox text to dictionary.get("key").

  • oosyrag I just don't get it:( I'm very confused. Please, can I get a tutorial, or capx example of how to write in a textbox, save it locally, and then load the different messages, again at a later time? Every tutorial I read and watch, never seems to show how to locally store what's written in a texbox. I'm a visual learner, and I just don't get the setup (and a few other things). Please, I really need help with this one. Not only would it help me out, but I'm sure it would also help out a lot of other confused people as well.

  • I was saying that you literally did it right, but your event sheet was not linked to your layout so your event was not taking effect.

    https://www.dropbox.com/s/0mmv7nmte4fl1 ... .capx?dl=0

    As you type into the textbox, is is written into the dictionary object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was saying that you literally did it right, but your event sheet was not linked to your layout so your event was not taking effect.

    https://www.dropbox.com/s/0mmv7nmte4fl1 ... .capx?dl=0

    As you type into the textbox, is is written into the dictionary object.

    I know. I did what you told me to do, and it worked, but I still don't understand how to load the different messages, like displaying the "keys" as clickable, or a search bar or something.

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