02-21-2006, 07:53 AM
How can I make a program wait a second or two before moving on.
I'm fairly new to QB, I wrote a basic game that has a town with 4 options, shop, sleep at the inn, view status, or battle.
I have a stat system setup, each stat affecting the damage in combat.
I would like things like
PRINT "You Attack!"
[wait 1 second]
(Process here)
PRINT "You Deal 15 Damage!"
[wait 1 second]
PRINT "Enemy Dies!"
[wait 1 second]
CLS
PRINT"Level Up!"
etc.
The only way I can think of doing a delay is
DO UNTIL Inkey <> " "
LOOP
I've seen the sleep command being used, but I get an error "Error: Expected end-of-statement" when I use it.
I'm fairly new to QB, I wrote a basic game that has a town with 4 options, shop, sleep at the inn, view status, or battle.
I have a stat system setup, each stat affecting the damage in combat.
I would like things like
PRINT "You Attack!"
[wait 1 second]
(Process here)
PRINT "You Deal 15 Damage!"
[wait 1 second]
PRINT "Enemy Dies!"
[wait 1 second]
CLS
PRINT"Level Up!"
etc.
The only way I can think of doing a delay is
DO UNTIL Inkey <> " "
LOOP
I've seen the sleep command being used, but I get an error "Error: Expected end-of-statement" when I use it.