Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is wrong with this?

Asked by
Mauvn 100
11 years ago

Hello, i'm doing a disaster game and i want when the disaster is in action there is a hint to tell when the disaster will end here the script:

1countdownTime = 20 -- How long until disaster comes
2countdowntime2 = 40
3disasterTime = 40 -- How many second is the disaster
4 
5countdownMessage = "The next disaster will occur in %s seconds."
6disasterMessage = "Disaster %s"
7countdownmessage2 = "The Disaster will end in %s Seconds! Stay Alive!"

Any kind of help is appreciated!

1 answer

Log in to vote
3
Answered by
wazap 100
11 years ago
01countdownTime = 20 -- How long until disaster comes
02countdowntime2 = 40
03disasterTime = 40 -- How many second is the disaster
04 while true do
05for i = countdownTime, 0, -1 do
06countdownMessage = "The next disaster will occur in "..i.."seconds."
07wait(1)
08end
09 
10disasterMessage = "Disaster %s"
11 
12for i = countdownTime2, 0, -1 do
13countdownMessage2 = "The current disaster will end in  "..i.."seconds."
14wait(1)
15end
16end
0
I see no point of disliking this reply. Liking. Nickoakz 231 — 11y
Ad

Answer this question