#I need Help =(

124 messages · Page 1 of 1 (latest)

upbeat heron
#

I need help with my tower defense, this is my wave system, and i want to know how to have it start the next wave after it prints wave end, i do not know much about scripting so im asking here 🙂

latent gardenBOT
#

studio** You are now Level 3! **studio

upbeat heron
#

this is the 2nd half of my wave system code

#

I want it to start the next wave right after it prints "Wave ended"

#

idk how to script it though

valid umbra
#

try putting the print statment after the repeat until

#

which should print wave ended after the mobs die

upbeat heron
#

well, i want the wave to end even if the mobs are still on the map

valid umbra
#

then do you want a time limit or something?

#

when is the wave gonna end then

upbeat heron
#

yea like have it so the wave will end after a certain amount of time, and then have the next wave start like 3 seconds after the previous wave ended

#

the wave will end a certain amount of time after it started, depending on what wave it is

valid umbra
#

ok then remove the reapeat untntill

#

and just add a task.wait

#

also whats the task.spawn function doing?

#

its not gonna yield the code

upbeat heron
#

i have no clue tbh

valid umbra
#

yeah its not needed either

upbeat heron
#

k lemme try it and see if it works

valid umbra
#

so just add like task.wait(60) and then print wave ended and task.wait(3)

upbeat heron
#

where do i add task wait (60)

#

and how would i make it so that it scales with the wave #

#

like on wave 1 it ends after 10 seconds and then on wave 2 it ends after 15

valid umbra
#

like where the repeat statment was

upbeat heron
#

smth like that

#

so delete this?

valid umbra
#

ok base the time on waves

#

ye

upbeat heron
#

ok

valid umbra
#

so you can say if wave == 1 then task.wait(10) end

#

or base it on a increament

upbeat heron
#

i have it like that

#

what would i change

valid umbra
#

if wave ==

upbeat heron
valid umbra
#

end

upbeat heron
#

okay

valid umbra
#

also make it on the same line if its still red

upbeat heron
#

it is

valid umbra
#

leme do it in my studio to ezplain it better

upbeat heron
#

okay

#

want me to copy the code for you or nah

#

oh hey it works now

valid umbra
#

wait hold on do you want it to increase by 5 secs each wave`?

upbeat heron
#

i was going to have it be higher because its a 15 wave system

valid umbra
#

so waht increament

upbeat heron
#

but yes that would work

#

probably 15 seconds increase

#

each wave

valid umbra
#

ok then all you need is

upbeat heron
#

in case they are afk at start the waves will still go by

valid umbra
#

you dont need the if statment

upbeat heron
#

ok ok

#

tysm bro

valid umbra
#

just do that

upbeat heron
#

ive been asking so many people but

#

nobody understood how to do it

valid umbra
#

np

upbeat heron
#

😭

#

ty ❤️

latent gardenBOT
#

studio** You are now Level 4! **studio

upbeat heron
#

huh

jaunty token
latent gardenBOT
#

studio** You are now Level 36! **studio

warm orbitBOT
#
Program Output
table: 0x5598958e5d20

jaunty token
# upbeat heron

But this is a really good effort if you are new to programming, but you should learn tables since you can pretty much do anything with them

upbeat heron
#

yea thank you

upbeat heron
#

i didnt know what tables were so

#

@jaunty token i do have another question not about the wave thing

#

i can dm you about it if you want but

jaunty token
upbeat heron
#

k

jaunty token
#

This way other people than me could aenser

upbeat heron
#

okay

jaunty token
#

I gtg in some minutes so

upbeat heron
#

so i have a system where these "Mobs" walk/run to waypoints since its a td game and they run along the track, but sometimes they basically skip or dont actually hit the waypoints, is there a simple way i can fix it?

#

i can send a pic of my script for the waypoints

#

thats what i have

#

top is for waypoints

#

bottom doesnt matter thats just for collisions

#

this is my base map as a placeholder

#

the gray blocks are waypoints

#

yellow block is starting spot

#

is there a way to make it a 100% accurate run path?

#

like they are turning on the stud to the right of the waypoint

#

the zombies atleast are

#

and my "Mechs" are just completely skipping it

#

💀

jaunty token
upbeat heron
#

could i just make it so that they run to a specific coordinate?

#

would that fix it do you think?

#

cause these guys do not want to go to the waypoint idk why

jaunty token
upbeat heron
#

whats vector3?

jaunty token
upbeat heron
jaunty token
upbeat heron
#

oh okay

upbeat heron
#

it does it in different spots too

#

its weird

#

and inconsistent

#

like at the end sometimes the same thing will hapen

#

they will cut the corner

#

@jaunty token do you know a basic script to change my zombies walkspeed?

#

if not its okay just wanted to ask

jaunty token
latent plinth
#

yandere dev ahh code 💀