G
Gamemaker newbie
Guest
Dear all,
I wrote the following countdown function which passes a time and a variable indicating the time is over or not.
But this is not working. Only the values are being passed. There is no update in the variable.
function countdown(time,isTimeOver){
if (time>0){
do { time--; }
until (time<=0)
time = 0;
} else {time=0;}
isTimeOver = true
}
Thanks!
I wrote the following countdown function which passes a time and a variable indicating the time is over or not.
But this is not working. Only the values are being passed. There is no update in the variable.
function countdown(time,isTimeOver){
if (time>0){
do { time--; }
until (time<=0)
time = 0;
} else {time=0;}
isTimeOver = true
}
Thanks!