New Tower Types - Tower Defense Tutorial #9
Вставка
- Опубліковано 21 тра 2024
- We add more more defensive tower units to the game, each with their own damage, cooldown, and range values. Also, a fancy new UI to go along with it.
Paint.NET Plugin ►
forums.getpaint.net/topic/129...
DISCORD ► / discord
TWITTER ► / gnomecoderblx
TIMESTAMPS►
0:00 Intro
1:05 Creating GUI
7:22 Creating images
8:00 Dynamically creating buttons
12:12 Tower Config
16:20 Scripting Config Values
19:45 Testing
20:40 Tower Limit
24:50 Outro
Hey everyone! If you want to put decimals into your cooldown/damage/range use a NumberValue instead of an IntValue!
thanks really helped a lot
thanks!
i try
Helpful!
thanks!
Tutorial for an Ice tower (permanent freeze or speed-up) :
1) Add a Bool Value inside all of your towers and call it "Freeze", if your tower can slow down enemies mark the value as true (blue check) if your tower has this value and does not slow down enemies, mark it as false (empty box) (You can also NOT add the bool value in the towers that don't freeze, and you specify on the code later to set freezing as true when it finds the bool, else, if it doesn't find it, set it as false!)
2) Add a Number value (or IntValue) inside all of your enemies and call the value "Frost" (or anything you like, but remember it!), the value of "Frost" will be the victim's WalkSpeed once it is hit by the tower, so if your enemy has a WalkSpeed of 6 and the Frost value is 3, when the enemy is hit by a tower that can freeze the enemy then it's WalkSpeed will become 3 instead of 6 (theoretically, you can also use this to make a tower that can make enemies faster!)
3) Inside the Tower script, in the tower.Attack function and after the target.Humanoid:Takedamage, Add this piece:
target.Humanoid:TakeDamage(config.Damage.Value) --(target takes damage)
if newTower:FindFirstChild("Freezes").Value == true then --(if the tower can freeze then...)
target.Humanoid.WalkSpeed = target.Humanoid.Frost.Value --(The target's WalkSpeed becomes Frost Value)
target["Body Colors"].HeadColor = BrickColor.new("Steel blue") --(this will change the victim's head color)
target.Head.Transparency = 0.3 --(this will be the victim's new head transparency to imitate ice)
else --(if it can't freeze...)
end --(Then Don't freeze and end!)
Side Note: as i've already said, this is permanent, so if an ice tower freezes an enemy, such enemy will stay frozen for it's entire lifetime (either until it dies OR until it reaches the base)
As a heads up, target["Body Colors"].HeadColor = BrickColor.new("Steel blue") is assuming that your enemy has a Body Colors object and a Head, make sure to add them to your enemies (or mobs), this is a purely optional cosmetic change! You can delete it, or change to any color, change transparency, or any properties!
Thank u, will be credited in my game
@Flex a tower defence game, but I'm making a lobby with different games, the idea is so people can play the different games with the same themes and maybe to make people try other game types, also some arg stuff. But ofc it's gonna fail cause I'm small yt
hey, ur me
@@Boomerlol No, We're me
@@PhantomicRBLX don't worry I've finished it all
These tutorials haven't just taught me how to make a tower defense game, they're also teaching me well in depth how to code better since before these tutorials I only had a decent understanding. These video's have also encouraged me to continue trying to be a developer, and I want to thank you so, so much for making these videos. You deserve so much more than 50,000 subscribers. 10/10 well in depth amazing tutorials.
Edit: Also to everyone who keeps asking for extra stuff like certain detections or different types of enemies, he has to get the core functions of the game down to start adding extras like that in or it'll just be all messy.
Same here, I went from asking for help in his Discord to helping out sometimes in his Discord just from these videos. Can't thank him enough
@Gius432 rude
Can any of you guys like give me your GameController code? I have had this error for a couple days now where whenever I clicked anything, the ImageButtons duplicate each other. PLEASE HELP
This is a very good series! You are the first person that makes this series without free models full of scripts!
true that those models are efficient, but they are bad if something breaks most people won't know how to fix it, yet from Gnome's tutorials we will understand most of the stuff that's happening!
Can any of you guys like give me your GameController code? I have had this error for a couple days now where whenever I clicked anything, the ImageButtons duplicate each other. PLEASE HELP
Please never give up this series, you are my favorite youtuber because of this.
Yeah gnome, please never let this series down
@@sjoerdgaming876 Exactly, Gnome please dont run around and desert this series
Never make this series cry
@@creamking69 Never gonna make this series say goodbye
Tysm for making this series, I have wanted to make different towers for so long and now I can!
Can you help me out with the GameController code? I have had this error for a couple days now where whenever I clicked anything, the ImageButtons duplicate each other. PLEASE HELP
Awesome tutorial gnomecode! Also, if anyone wants the cooldown of the towers to be lower than 1 then use a numbervalue instead of an intvalue cuz intvalues only store whole numbers
here since 50 subs! You deserve far more than 50k :D
AWESOME tutorial gnome code! I cant believe you responded to my comment before. Thanks for Tower defense tutorial #9!
this gnome has the coolest personality AND makes good tutorials
perfect
Great!
I like this, I'm getting into more tower defense and strategy games. I'm looking forward to when this game is released to the public!
Can you help me out with the GameController code? I have had this error for a couple days now where whenever I clicked anything, the ImageButtons duplicate each other. PLEASE HELP
Thank you so much for being clear all of the time :)
You really make this easy
It works really well
You REALLY deserved your sub
Amazing! This is a really good tutorial, can't wait to see more! You earned a sub from these easy-to-follow tutorials, thank you!
Hi eclipse scout
I only child why not.
Thank you so much!!! After my time break I return to work! You the best!
by far the BEST series ever made
Incredible! you deserve more subscribers than you have! I always wanted to make a game in roblox studio, and more about tower defense !, I would literally like to thank you in a very big way for everything you do! I love your videos!
For anyone looking to make a traditional tower defense spawn GUI (on the bottom), you can use the position {0.15, 0},{0.85, 0} and size {0.7, 0},{0.13, 0}. You can change some decimals or values to your liking, but this is just what I used.
while watching this i kept of thinking of ideas he could do he helps so much i cant wait to start my tower defense game tdd
I love your videos and thanks for episode 9!
thank you for all the help i really really do appreciate it😄
Thanks so much for the tutorials!
cliff/ area damage enemies?
like a value that you can check for
CliffTower --- you can only place them on a folder in map that restricts it to be placed on the ground instead u put parts in the folder that you want him to be able to get placed
ExplosiveTower --- he has area damage
MeleeTower --- swings its melee weapon so he can deal damage to multiple enemies at once but its different to area damage
This series really have o get a Best Tutorial in the world
YES I NEED THIS SO MUCH! I LOVE YOU! !!
Is there anyway of making a tower does splash damage (which deal damage to multiple mobs nearby )
and also keep up the good work really liking the series i learned so many stuffs!
LETS GOOO!!!
perfect timing
also first :)
I love these tutorials gnome!, after the important stuff can you do a video on how to do admin commands like tower defense simulator? i'd feel like they'd be pretty fun to mess around with
I just thought about it, I guess I know how to do it but I don't consider myself advanced enough to do that lol
suggestion:
tutorial on how to make a tower inventory system, difficulties and more about choosing levels
There is gonna be a whole lot more tower defense games after you finish this lol, but great explaining keep up the good work!
Beautiful i can't wait for the next video
This was very helpfull! Thank you!
I hope there will be also towers spawning units and also as well damage/projectile type so we can make immunitys, along with different kind of enemies like "camoflaged" so many roblox developers can create their own attributes to enemies! These tutorials are really usefull and easy! Hope your channel keeps growing, it's wholesome to have people like you that help a lot so other people that are developers on roblox can share thanks to you!
u really want to copy tds lmao?
@@officialcappo Enemy atrributes are a mainstay in tower defence games and is not just TDS with immunity think of other tower defense games like Bloons tower defense
@@officialcappo its not just in tds lol
@@officialcappo you know tds isnt the only tower defense game right
pov: shitty drama starting over shit
Amazing series!
Amazing content Dud!
thanks gnome amazing tutorial
Awesome video! Helped me a ton, but I had a random question about the base health system, is there anyway to make the HP bar (above the base) like an image on the players screen (like at the top of the screen) if so, how would you go about doing it?
you can change the offset value in the properties window
finally a relaxing episode
Great video Gnome! Once I have time I'll do episode 6 since that episodes long 😥
Another Great episode
Hey Gnome Code i found this "variable 'mob' defined at line 1 is never initialized or assigned; initialize with 'nil' to silence" when I was coding on the bottom of the text there's a blue line so what does this means?
For the next video you could make a currancy system for buying, and maybe upgrading them, love ur vide and goodluck with everything😁👍
Cool, keep going!
Great Tutorial Btw GnomeCode! Just One Question, Is there a way where if a player places max units and tries to place another, a TextLabel pops up on their and says “MAX UNITS REACHED” Thank you!
Everyone there is a flaw in the tower limit system, if you reset, the limit also resets, so if you don't want that, disable the reset button and you're good to go
cant wait for this game to come out
I think it would be cool if you added a necromancer tower or a summoning tower like gnome king who spawns gnomes who go down the track starting at your base the more upgrades the faster it spawn and the more health it has :P
I think it would be cool if you used the tools daddy gnome has already given to you to figure it out yourself
@@InoriVoidI think it would be cool if you didn’t respond to a year old comment
@@eee_eee I think it would be cool if you didn't use time to justify an atrocious lapse in judgement
@@InoriVoid 😐
@@InoriVoid i think it would be cool for you to respect him and not call him 'daddy gnome'
Hey thanks for making these vids
This series is so useful. I have a problem with my animations though. The noob and mech walk as normal, but the zombie and Teddy animation don't play.
you have to export them
he covered this on episode 3, to get the zombie animation, load up the animation editor. the animation should be there, so publish it and copy the id of the animation. teddy however doesnt have the animation so make your own
is it looping?
Cheers :) This helped a lot developing my indescribably stupid game.
Tutorial on how to use ViewportFrames instead of decals cuz I ain't doing allat;
1. Get a plugin called ViewportEditor or make your own viewport frame using a camera and your tower model
2. Add this finished frame to your config folder instead of the decal
3. Clone the frame and add it to the button. Set the size to (1,0,1,0)
4. Tweak anything else!
such a good video!
Could I get some assistance: I have 3 towers and only the slinger one works perfectly fine the other one is the wizard and it does the damage and range and cooldown but the animation never works for attack only idle works. and then the last tower is the gunner sometimes when I place nothing works not the animation not the damage cooldown or range. Other times I place the gunner and it does work the animation and the damag, cooldown, and range but the animation won’t stop even when it’s not attacking. the last scenario for the gunnner is that sometimes the first scenario happens but then the next wave the 2nd scenario occurs. Also the order of the tower gui’s changes sometimes when I leave the play the game and rejoin. I haven’t been able to finish the last 5 minutes of the video because of these issues. Any help would be appreciated!
Edit: Forgot to mention that the output doesn’t say there is any errors so yeah.
Question, how would I use a model, just a part with a humanoid and a mesh to make a tower
Hope you respond! Thank you!
Can you please make a video on how to make a working cctv? Where if you are infront of a camera whatever is seen through the camera will project on the tv or screen? Just like a live tv news! I will really appreciate it!! Keep up the good work 👍
Great video as always, but i have a slight problem. The animations are kinda buggy and i don't know how to fix it. I would be glad if you could help me!
Let's go episode 9!
Great video as always! Just one question tho, for me the images don’t work and the towers placed thing works but not the text do you have any solutions gnome? Thanks as always!
I have same problem - it says that there is infinite yield thing for images
some more niche things I would love to see. Summoner enemies, spawning towers and bosses with a giant health bar. Also it would be great to know how to add health bars to all enemies
yes, because my enemies don't have "Head" objects, so it doesn't display a health bar
Hey gnome I want you to make like special effect something like stunning enemy and maybe like upgrades and every upgrades can add like special effect and more range or more damage
Question: Will you make this a kit/uncopylocked like how you did with your teddy game which was amazing but will you do the same with this game?
Tha'd kinda beat the point of making this series, pretty sure he isnt gonna, for the viewer and his view's sake
Thank you so much for this! You work very hard on all of these videos I’m sure and you make us happy by helping make a td game!
Hi, there was an error while I was putting different characters. When I press the gui part, yes, but it comes in the ground, so when I press the gui part of the character is in the ground, when I click it, it comes out of the ground and stays in the air. How can I fix it?
im having an issue where the rotations and animations of towers are delaying. can you help me fix?
This is my fav coder no cqp
Hey gnome i am stuck in part 1, the zombie isnt even moving i used drooling zombie, the script is just fine and it says waypoints is not a part of workspace? can you help
Awesome video, Could you teach us how to make a lobby and an elevator to get in the game? And also a shop.
Hey Gnome, could you give us the plugin link for the chromakey you used? Thanks!
Try this one: forums.getpaint.net/topic/12991-chroma-key-green/
@@GnomeCode Thanks, i'll try it out! :)
Edit: It works very well! Thanks so much, the other one I was using was terrible with tolerance.
For some reason all accessories that I put on my defending npc (tower) detach from it and drop on the npc's foot where my cursor is while I'm in a placing tower state, but when I place the tower everything goes back to normal and accessories are on their place. I have no idea how to fix it.
EDIT: To fix this issue I just had to manually rig every handle in accessoriess to humanoidrootpart. It solved the issue however it was really time consuming and it worked fine before this video. But it was me who made the mistake somewhere in coding becasue in the tutorial everything works as it should.
I need help, so when I create my script of cloning the button, giving it the photo, what to place, and all that, I start to test the game, then I see whenever I click, press a key on my keyboard, or place the cursor off the window and come back on it, the cloned button keeps duplicating and creating so many buttons that it goes off my screen. Any solutions?
Gnome code is the brute of coding
@gnomecode what was harder to code Teddy or this?
i think i'm going to not have a limit to how many towers you can spawn like in the bloons tower defense series, but I might start ramping up the price for each new tower
So can you make an upgrade system, cash system and status of the enemy
Much helpful thx
Gnome theres an issue with the video, you know the youtube sections thingy on the progress bar? You havent changed it so its the same ones from episode 8
Good spot. Not sure what happened as the timestamps were correct. I just removed and re-added them and seemed to fix it. Thanks for the heads up
@@GnomeCode no problem
Hi there, how do you make the image? I don't know what website he is using.
Good question will there be a an official model for the entire tower defense you had made? or you're gonna not do it because of viruses in trust worthy models which was copied and filled with viruses and published to "toolbox"?
can you do different tower types i mean placement so example:
you could have cliff towers towers that can only be placed on cliffs
or towers that go down the track
im learning new towers and enemies mechanics without you, its actually works
yo gnome when u reset the tower limit resets can u show hwo to fix that also when you reset with the tower placeholder selected the placeholder stays there
Hi I love your work
How about an upgrade tower or sell system to the towers? Also a cash gui?
Hey this is an amazing tutorial but how do I make it where i can make my own models? Is there a way to do thwt
Hey so i want to make like a map that after the enemys go to a certain point they will get teleported to a different area any scripting help?
What kind of app are you using for making pictures? Or is it a plugin? Can I have instructions please
I showed you in the video. I used the paint.NET application with the chromakey plugin. getpaint.net/
@@GnomeCode thanks
fun fact: you can have outlines on cornered UI, all you have to do is add a UIStroke into the UI object. If ApplyStrokeMode is set to “Border” it will outline the shape, if it’s “Contextual” it will outline text. also you can have customizable thiccness too.
ur welcome if i made ur UI 69x better :D
I made mine manually and It was hard lol, maybe after I finished the whole series I will do some GUI tutorials next
wow thanks it made it a lot better
The last sentence has a deep meaning
how do u get rid of the white net looking thing when ur using animation thing cuz i wanna take a good ss
Can you help? After the first attack, my towers always start, so to speak, to jam without errors. You can help?
so i am having the problem that if i click the imagebutton the tower wont apear in the placeholder ho do i fix this?
@GigaChad-yi2fz You made the same mistake I did. Make sure that your Template GUI is Active(make sure the check mark is ticked on). GnomeCode definitely should have told people this info in the video. Template must be active or towers will not appear in the placeholder.
Three musketeers, nah, three gnome-keteers
this joke was so bad lol
Thank you so much now i can do a tower defense game are you doing lobby, range of towers or upgrade towers in the next Video?
You can do lobby yourself, it’s only building
But how to do the tower shop and elevator?
Help me pls: When I delete a template, only the first unit is installed and the others are not. I looked and it says an error in the Tower line 52 script, it says: newTower.HumanoidRootPart:SetNetworkOwner(nil) What am I doing wrong?
Hello Gnome, your tutorials are really helpful, but i still don't know how to make script of getting/spending money and how to make lobby, can you help?
Sounds like the newly released 10th episode is what you're looking for!
Also can the hp for the base is it possible to make it on the screen not a floating gui
Randomly the bottom of my game controller has stopped working the "(cframe)
end
end
end)"
Part is underlined in red but when I press run the output shows no errors.
Hi gnome, the body gyro thing is not working for me! Can u please fix it?
Idk if you will respond but i hope you can make a turtorial about chnaging cameras, pretty much, i have a 2d game but whenever the chacter finishes a level he teleports to his house and then has a topview, but im struggling how to make it switch
How did you make the models? Blender?
I really need help, im on ep 2 but i cant seem to find the problem with my code, my error is saying that its Expecting an end(to close to 'do'). I really need help ever since i put in my mob.Move(newMob, map). , please send me some recommendations
can you do a tutorial on how to make the buttons a viewport instead of an image i think that would be cooler