Random text button???

Discussion in 'How Can I...?' started by Vaga Games, May 10, 2016.

  1. Vaga Games

    Vaga Games Boxer

    Joined:
    May 3, 2016
    Messages:
    6
    Likes Received:
    0
    Hello everyone,

    So lets say i have a button called "random" and when you hit this button?
    it says "Hello welcome" and when i hit it again, it may say "Bye bye" or something else i wrote?

    Ofc i have made all the text, but i want to be able to make a button that takes out alot of random text that i made myself.

    Lets say i made 100 text lines, which means each text should have 1% chance to be shown. ?

    Is this possible?
     
    Last edited: May 10, 2016
  2. JustWatchApps

    JustWatchApps Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    315
    Likes Received:
    145
    @Vaga Games You want the text to show after a button press? Is there any other action other than the text appearing when the button is pressed?
     
  3. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    I'm not sure if you could attach to a button press somehow but if you have 4 lines of text:

    1) Use Action objects with solid backgrounds (not label widget).
    2) Stack them on top of each other
    3) Set "Appearance Chance" of top image to 25%, next to %50, then 75% then 100%.

    Each message then should have a 25% chance of showing.
     
    trudnai likes this.
  4. Vaga Games

    Vaga Games Boxer

    Joined:
    May 3, 2016
    Messages:
    6
    Likes Received:
    0
    Yes after button presses.
    No, only the text.

    I will try this thanks! :)

    But i would like to have like more than 100 text if possible. But ill try this :)
     
  5. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    For 100 you would use 1%, 2%, 3% ... 100%. If you wanted more then just divide 100 by the total to get the percent to add each time. But I wouldn't use it for more than a few messages as it would be time consuming to setup. But you certainly could experiment with the idea.
     
    Last edited: May 11, 2016
  6. Vaga Games

    Vaga Games Boxer

    Joined:
    May 3, 2016
    Messages:
    6
    Likes Received:
    0
    Thanks, didnt think about that... :D

    Well yes time consuming indeed. But its something alot people in my country want! So thanks!
     

Share This Page