IN-GAME COUNTER
These scripts create an in-game counter during game play.
This script was created by GENERAL ELECTRIC (NOVAWORLD FORUM)
A.) counter that counts the seconds into the game:
if never then
set(v60,0) ; s into game
set(v70,0) ; helpvar s
set(v80,0) ; m into game
set(v90,30) ; cd m Minutes for countdown
set(v100,59) ; cd s
endif
if elapse(1) then
inc(v60)
inc(v70)
dec(v100)
endif
B.) converting seconds into minutes
if eq(v70,60) or eq(v60,1) and ne(v90,0) then
inc(v80)
set(v70,0)
dec(v90)
set(v100,59)
endif
C.) Making a countdown
if elapse(2) then
consol#("Minutes left",v90)
consol#("Seconds left",v100)
consol("Countdown")
D.) making a timer instead of countdown
if elapse(3) then
consol#("Minutes played",v80)
consol#("Seconds played",v70)
consol("Gametimecounter")
E.) trigger for countdown
if eq(v90,0) and eq(v100,0) and never then
text("Countdown finished")
endif
or do a simple counter using chain (this is my script)
if ssnarea(10000,1) and never() then
text("You have 1:00 minute left")
Wave("happy1.wav",1000)
endif
if chain(30) and never() then
text("You have :30 seconds left")
Wave("happy1.wav",1000)
endif
if chain(20) and never() then
text("0:10")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:09")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:08")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:07")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:06")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:05")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:04")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:03")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:02")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then
text("0:01")
text("")
text("")
Wave("happy1.wav",1000)
endif
if chain(1) and never() then // player is dead
killSSN(10000)
text("You're dead")
endif
|