Help meeeeeeEE random text in my gamme!

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Well.. I want to insert a random text if i Click on a button (there are 29text) . I want insert one of them (randomm) In the specify position

    How Do I??? HElP ME PLEASE!!!! Sorry for my translate into english but I'm Italian

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could simply have a string containing all your words with the default delimiter.

    car,fence,loophole,bat,cigarette,opium,bottle,wheel,...

    Then if you used the gettoken expression like so

    Gettoken(string,4)

    would return "bat" in case of this example. Get it?

    You could insert a random word easily into sentence for example:

    "He opened the trunk and there it was: a giant "&Gettoken(string,Random(Numtokens(string)+1))

    The Numtokens expression counts the number of tokens, the plus one is there because the Random expression is 0-based.

    Hope that helped!

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