dop2000's Recent Forum Activity

  • I think it's only for external programs like explorer, but you should test to be sure.

  • By default there is a single instance of JSON object. So if you parse a new message in it, the old one will be overwritten.

    You can create new instances of JSON (just like you create new sprite instances). But be careful to always pick the correct instance of JSON in other events and functions. You can distinguish them by instance variable for example.

  • Glad it works! You should probably use double quotes in case the path on user's computer has spaces. For example "My documents" instead of "Documents".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the function doesn't contain any "Wait" actions, it will return the value immediately. If there are waits, you need to set the function as "asynchronous". Although I never tried this with functions which return values.

  • You can use this addon to move a sprite along a curved line:

    construct.net/en/make-games/addons/198/spline-movement-c3-runtime/versions

  • Add a temporary Text object to the layout, print NWjs.UserFolder to it. See what path it returns. Maybe you don't need to append "\Documents\DinoSystem" to it.

    Then try executing explorer.exe from CMD with that path.

  • That was just an example.

    Anyway, for exporting to CSV you need to compose a multi-line string where each question ends with a newline. There should be a comma between each value in the line.

    Example:

    question1,No,timestamp
    question2,Did Not Understand Right to....,timestamp
    question3,Yes,timestamp
    
  • I would move all logic to instance variables on the Button sprite. (a single button for Yes and No answers)

    Configure these variables on each button for all questions.

    So when a button is clicked, you can compare its variables and know if the answer was correct or not, what to add to the CSV file and what to do next. This way you will only need one handling event for all questions in the quiz.

  • See the Date plugin, there are different ways you can format the timestamp string.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/date

  • Hmmm. So take out the array values through the whole thing? I've got a lot of

    This is not how quiz apps should be programmed. Even if there are hundreds of questions in the game, ideally you should have just one "On AnswerButton clicked" event.

    Use instance variables on the buttons to identify questions and answers.

  • I have a one dimensional array of data, but when the csv downloads, it's just a bunch of 0's instead of the text I set to be added to the array.

    Run the project in Debug Mode (Shift+F4) and check the contents of your array.

    Your event #16 on the screenshot runs on every tick, which is wrong. You need to move it as a sub-event to #17.

    And the MIME type needs to be "text/plain" or "text/text", not "s".

    But with 1D array you won't be able to send timestamps. I suggest using 2D array, or add question+answer+timestamp+newline to the string variable on every answer.

  • You can do this without arrays, just add each question+answer to the string variable as the player answers them. Use Date plugin to get the current date and time.

    For example:

    On leftclick of YesSprite: Set exportString to (exportString & questionNumber & "," & questionText & ",Yes," & Date.ToString(Date.Now) & newline)

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 262 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies