Page 1 of 1

Random Option?

Posted: Thu Jan 29, 2009 9:19 pm
by guest
I'm a very indecisive person
so is there any way that I could put a "Random" option onto my menus?

Re: Random Option?

Posted: Thu Jan 29, 2009 9:40 pm
by JQuartz
This should do the trick (It's roundabout and a quite a hassle though)

Code: Select all

menu:
    "Eat plutonium":
        jump eat_plutonium
    "Eat uranium":
        jump eat_uranium
    "Eat random radioactive material":
        jump eat_random

label eat_random:
    $ value=renpy.random.randint(1,2)
    if value==1:
        jump eat_plutonium
    elif value==2:
        jump eat_uranium
    
    

Re: Random Option?

Posted: Wed Feb 04, 2009 3:03 am
by $inker
Nice, thanks for the tip, I'll have to use the idea in the game I'm making. Although I don't think I'll have those exact choices; after all who wants to eat uranium, it has an awful aftertaste. :P