Log In  
Follow
erayers
[ :: Read More :: ]

Hi, I'm new to the scene here- I'm just writing a text adventure game and I'm looking for a way to scroll the text or just get the player to the "next page" of text? The map I load into the game is only a drawn border or fancy frames for the game... This is the code I have as of now, but the program skips to the last update function when I press the 'X' button/key in the game is the problem I currently am faced with. I also have yet to figure out an inventory system or anything similar. I know my code isn't clean- nor is it efficient, but I'm just looking to do a text adventure. Any help is appreciated however!

-- main
cls()
-- prints map
map()
-- beginning
print("my story text here",15,20)
print("my story text here")
print("\n")
print(" (hit x to continue)")
print(" other buttons displayed here",20,100)
print(" ")

-- button pressed
function _update()
if (btn(X)) then
-- scroll text
cls()
-- prints screen
map()
-- beginning
print("my story text here",15,20)
print("my story text here")
print("\n")
print(" (hit x to continue)")
print(" other buttons displayed here",20,100)
print(" ")
end
end
function _update()
if (btn(X)) then
-- scroll text
cls()
-- prints screen
map()
-- beginning
print("my story text here",15,20)
print("(hit the < key to (do "something")")
print("(hit the > to (do "something")")
print("️ other buttons displayed here",20,100)
print("my story text here")
end
end

P#100376 2021-11-18 22:10 ( Edited 2021-11-18 22:21)

Follow Lexaloffle:          
Generated 2024-03-28 18:06:10 | 0.059s | Q:5