Posted 09 November 2012 - 01:29 PM
I'm trying to write a simple text adventure, but I can't figure out how to get the window to work.
function window()
|+++++++++++++|
| |
| |
| |
|+++++++++++++|
end
function encounter()
…
…
end
window()
encounter()
|+++++++++++++|
| encounter() |
| |
| >You type here |
|+++++++++++++|
And the second part of my question is how do I prevent the walls of the window from moving like so if you type inside of it?
Any help would be appreciated.
print ("|+++++++++++++|")
print ("| |")
print ("| |")
print ("| |")
print ("|+++++++++++++|")
I can get it to print this ^ to the screen but what I'm trying to do is put the window code into a function to save time, and then have the 'encounter' code appear inside the window.function window()
|+++++++++++++|
| |
| |
| |
|+++++++++++++|
end
function encounter()
…
…
end
window()
encounter()
|+++++++++++++|
| encounter() |
| |
| >You type here |
|+++++++++++++|
And the second part of my question is how do I prevent the walls of the window from moving like so if you type inside of it?
Any help would be appreciated.