fingaz1's Forum Posts

  • 7 posts
  • I am working on editing an application that I am using for my students weekly exam.

    Before, it would simply ask random questions from a questions text file until the max number of questions have been asked. Then it would allow the students to submit the score to an online SQL database.

    But, I wanted to edit the app to have it copy/append the questions that were incorrect to a second text file so that when the main sheet is reloaded it would instead ask questions from the second question sheet.

    I've attached the main sheets, could use some help with this one issue.

    In the attached sheet, I've put together the rest of the logic as but now just need to figure out the last issue.

    Here is the link: tfepc *dot* //com// tmp/CText1.capx

    Thanks in advance for the assist!

    ""Sorry for the weird text but I can't post links yet""

  • Thanks for the assist Linkman, I used the dictionary and it seemed to work well.

    Now my last two tasks are:

    1. Send the results of the quiz (the score) to an outside source such as an email address, or maybe a database (which ever is possible and easier)

    2. Make it so the questions do not repeat themselves.

    I've been looking through the tutorials and forum posts, problem is I see tutorials on how to create random numbers with no duplicates, but with my project I'll be generating questions from a text file. So the things i've tried haven't worked.

    I was thinking I could add an entry in the dictionary perhaps to mark a question as being asked, but I don't know how well that will work if I have like 50+ questions.

    Any suggestions on either of these?

  • looks like i can't post urls :/

    well the tutorial name is Construct 2 Trivia App Part 4 (Final Features)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, then that makes doing this tutorial a bit difficult, i'm not sure if i'm using the script correctly then.

    Guess i'll have to try it out see if i can figure it out. I'm on the last part of this tutorial:But he is using webstorage, anyone know a workaround to this using local or should I hunt through the tutorials instead?

  • I have build 212.2 which is upgraded from the one I had previously, yet, I can't find the webStorage.

    According to all the tutorials and such I see online, it shows that WebStorage should be located next to LocalStorage, butI don't see it.

    Am I missing something?

  • It's doable of course.

    But as often, it depends on a lot of factors.

    In what you explain you don't mention if you'd expect the player to be able to draw more cards from the deck, or if you'd expect the drawn card to be "removed" from the actual deck.

    So in answer to your current question you want your keys to be named like "Card_1", "Card_2", "Card_3" etc...

    Something like that which is using a number.

    Consider also you are having a dropdown list plugin named "List"

    Then, in an "On start of layout" event, you make a subevent "Repeat 5 times".

    As it action you use the "Add item" action of the object "List" and set it as ("Card_" & int(random(MAX_NB)))

    Where MAX_NB is the greatest number in your dictionary cards + 1.

    This simple event allows you to display on start of layout five random cards taken from dictionary keys.

    To be able to fiddle more precisely and remove cards from the deck so there are no duplicates picked, I'd advised you to look into the that helps with making/shuffling and drawing from a deck.

    Thank you for the reply.

    Yes they will draw from the deck each new turn. Also there might be up to 4 copies of a card in a deck. So there will be times that a duplicate card is drawn.

  • Let me explain this better.

    So I am working on making a card game (similar to a trading card game)

    I want the turn player when they start their turn to be given a random 5 cards from the dictionary item which is serving as their deck.

    I was thinking of possibly adding a drop down to show what is in their hand.

    So when the game starts each player will get 5 random cards from their deck list placed into their hands.

    So the question here is is there a way to randomize the deck list in its dictionary container, or should I use something else?

  • 7 posts