Random Texte

0 favourites
  • 8 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Good Morning!

    I'm new here, and I'm trying to make a random text, someone could help me

  • Random as in?

    Technically you could have a For loop to get through a certain amount of iterations, and use Choose("Option1","Option2","Option3") to create a ''random'' string of words. But whether or not it will make sense is an entirely different story.

  • is to add questions to a (array) and use random numbers to get a text?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I understand what you mean now. And yes that is definitely a possibility, have an array of questions and answers, then use a random number to pick a question (along with the relevant answer(s)!).

  • now complicates me even more lol

    so I want you so wish he would pick a random text equal numbers

  • Basically, what you want is as follows (Pseudocode, mind you)?

    New Array (
        Contents:
        1 - What is the sum of 1 + 1?
        2 - How do you pet a Platypus?
        3 - What is love?
    )
    Display : Array[Choose(1,2,3)]
    [/code:123dvxxg]
    
    EDIT: The following *.capx basically contains the above: [url=https://www.dropbox.com/s/47r131fbuxajvhi/random%20text.capx?dl=1]https://www.dropbox.com/s/47r131fbuxajv ... .capx?dl=1[/url]
  • Thank you saved my life

    THX

  • Quick note: I set the Array Width property to 0 before adding stuff to it, by default this was set to 10 causing Array.Width to return 13 when the three options were added, this was not the desired result as there's only 3 strings in the array. Make sure to keep this in mind and change the base Width of a new array!

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