Like for example:
Game shows begining of long text.
User hits SPACE
Game then shows Chapter 2 of text
User reads Chapter 2, hits SPACE
Game then shows Chapter 3 of text
etc...
I made 3 parts of my text into variables, which are called by pressing space, but after I hit space once, it shows me the last part of the text, never even showing all the others! Here's my code. Please, point me to the right direction! Thanks a bunch!
Code: Select all
if inttex1 == true then
gr.printf("You have ventured far from your birthplace, to attend the court of Faderon, God-King of all Space, and Lord-Protector of Matter and Time. You came here seeking entry into the Royal Guard, and grand riches not imaginable in thine sickly distant feod. However, only a ruin of it's former glory greets you, as you draw near. Castle Fade, mighty citadel worthy of containing the Outer Gods - now a shambles. It's Gardens a mockery of Nature. It's walls and parapets as black and crooked as beggar's teeth, point aimlessly at the darkened, stormy sky. It's moat, like a tongue of rotten wood, sticking out of the uneven mouth of the main entrance.", 25, 455, 580, "center" )
end
if inttex2 == true then
gr.printf("A passing merchant you meet near the road to the keep, spits on the ground and mumbles with contempt: `Tis a bad omen to be striding near the perverted lands of the accursed Corpulent King!`. Left unsettled by this encounter, you make your way to the gate, and acknowledge your presence. Minutes later, you are already being escorted into the throne room, to be greeted by Lord Faderon himself!.. ", 25, 455, 580, "center")
end
if inttex3 == true then
gr.printf("`Ack! Pleasant day!` - The Corpulent King mutters, nursing a goblet of murky wine - `We hath a "..playerclass.." in our lively court! Disturbs me greatly tis, that news of my ordeal art so widely spread across mine land!`\nYou tell King Faderon that you came to serve his court, but you did not hear of any ordeal.\n`Then thou art but a fool, lowly "..playername.."!` - The Corpulent King spills some of his wine with a drunkard's gesture - `What need I for a fool, when gates to All Hells opened below my bustling halls, and all my Cosmic Might hath gone and left me?!`", 25, 455, 580, "center" )
end
if inttex4 == true then
gr.printf("`But perhaps, it hath not left me for good... For I am Faderon, King of Past, Present and Future, and all the Planes and Spheres of Outer Space are mine to rule and destroy!` - King Faderon pushes himself closer to you - `What say ye, lowly fool? Ye offspring of a dirty harlot! Mayhap thou wisheth to aid his liege in times of peril, and descend the caverns below? Or shall I be forced to set my She-Jesters upon ye for a terrible knifing?!`\nWill you agree to serve King Faderon through his ordeal? Press Y to serve. Press N to get knifed by She-Jesters.`", 25, 455, 580, "center" )
end
function love.keypressed(space, isrepeat )
if kb.isDown("space") then
inttex1 = true
if kb.isDown("space") and inttex1 == true then
inttex1 = false
inttex2 = true
end
if kb.isDown("space") and kb.isDown ("space") and inttex2 == true then
inttex2 = false
inttex3 = true
end
end