How do I create a word database?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello fellow Construct 2 users, I've recently run into a couple of problems with an app I'm trying to make. The basic idea is that users can type text into a text-box and submit an answer. I'd like to know how to limit their text options down to a selection of words that I provide, like a word database. The idea is that they can only type the words that exist in the database. Any other words they may type that aren't in the database turn back to a blank text-box and aren't submitted.

    Aside from this dilemma, I'd also like to know how to create a generator for 2 word databases once I've overcome the first problem stated. Basically, users can click a button and a random word from the database will appear on the screen for the player to view. This text doesn't have to be editable, it is read-only.

    I'd really appreciate some help on this guys, it's driving me half-insane. Thank you.

    ~TylerNormal

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you should read up on how to use arrays..

    After the person has pushed submit, loop through the array to see if the word exists..

    filling the array could be done with the csv2array plugin..

    This also answers your second question, for it would be easy to select a "random" word from the array and display it..

  • Perfect, thanks for the advice friend. It's working beautifully.

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