#TD GAME WAVE SYSTEM
62 messages · Page 1 of 1 (latest)
which part?
instead of after they all die, the time it takes for the wave to end would be dependant on what wave it is
Like i understand the words themselves
the way my td works is after they all make it to the end of the track, they dissapear, but i want it to end even if they are on the track
Okay well just put a task.wait(certain amount of time in seconds here) and then after that you just use a for loop to remove every mob on the track
Right?
im like very new to scripting so ill try and lyk if it works
thats the code i have for it rn
so what would i type next to until, instead of what i have right now?
i just started so i dont know like anything
Thats perfect
It check if there is anything left in the mobs folder or model or whatever class ‘Mobs’ is
But you can just leave the parameters in the task.wait() there empty
So instead of task.wait(3 + wave) do task.wait()
So this now checks every 3 seconds to see if there are any children left in ‘Mobs’ when there isn’t any left it continues and prints ‘WAVE ENDED’ and waits 3 second before quitting the function
do you know any way to have the wave end, even if the mobs are still on the track
** You are now Level 1! **
?
yes
but its dependant on the wave
so like on wave one it would end after say 10 seconds
but wave 15 it wouldnt end for 30 seconds
it scales
task.spawn(function()
task.wait((certain amount of time displayed in seconds) + wave)
--logic for wave end
end)
k let me try it
where would i puit it?
sorry for asking so many questions, im very new
ðŸ˜
no problem
you can put it right above repeat
okay
it didnt work still 
to show when the wave ends?
yea
i have that
it doesnt print out that it ends until all of them reach the end of the track
task.spawn(function()
task.wait((certain amount of time displayed in seconds) + wave)
--logic for wave end
print("Wave ended")
end)
YOU DIDNT ASK IT TO PRINT
I TOLD U ALREADY
IT HASNT GOT ANY INSTRUCTIONS OTHER THAN WAIT
i made a comment
--logic for wave end
that means
YOU IMPLEMENT SOMETHING YOURSELF
cuz i got no idea how your wave system works and therefor i cannot make anything to the wave system
you make that yourself
okay, ty
** You are now Level 2! **
that worked, the wave stopped before they reached the end, ty 
hey, do you know how to have the wave start like 5 seconds after it prints wave ended?
if not its okay, just wanted to ask
Task.wait(5)