Hi, I am "newish" to computercraft. I discovered it in december 2011, but stopped using it/am a noob. Is there a way to put in a bunch of print("XXXXX")'s and have it say one at random when you run a program. I want to do something like program name fact, having it give me a random fact.
Tuts/code would help a bunch.
Random sentence.
Started by UrASmurf, Jul 18 2012 03:17 AM
2 replies to this topic
#1
Posted 18 July 2012 - 03:17 AM
#2
Posted 18 July 2012 - 03:27 AM
phrases={"The cake is a lie","Pi is exactly 3.","Today is Friday the thirteenth."}
print(phrases[math.random(1,#phrases)])
sleep(1)
inserted somewhere in the shell programexpand the table to whatever count you want
#3
Posted 18 July 2012 - 03:53 AM
Thank you so much, is there a way to make it so it does not say the same line twice in a row?
I would expect its like if phrase = something then bloop blop.
Also, where would I put term.clear() to have it clear after every said phrase?
I would expect its like if phrase = something then bloop blop.
Also, where would I put term.clear() to have it clear after every said phrase?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











