The code in the function scropt now has to look like this in the latest GM (2.3) function mouseOver(xx,yy,width,height){ if(mouse_x > xx && mouse_x < xx + width){ if(mouse_y > yy && mouse_y < yy + height){ return true; }else return false; }else return false; }
Can you please extend this please? this is by far the best tower defence series out there! show us how to add different enemies after certain levels
@CoreyHardt7 жыл бұрын
In your o_spawn object, the alarm[0] is where the enemies are created for each wave. So inside of your alarm[0], before creating the enemy instances, you'd want to have a check to see what level it was, and then decide which enemies to make. So for example: if global.level > 2 { instance_create_depth(x,y,-1,o_enemy2); } else { instance_create_depth(x,y,-1,o_enemy); } This code would check to see if the player is past the 2nd level or not. If they are past the 2nd level, it's going to spawn a new enemy type that you would make an object for and call it "o_enemy2". And inside of that object you can make their speed faster or give them more health.
@gfjwgldwzqfdkgdhdfdjledkdd98563 жыл бұрын
@@CoreyHardt Yes, very nice
@Mando374084 жыл бұрын
This is amazing I would enjoy a extra episodes for extra enemies tower different tracks etc.
@patch2983 жыл бұрын
I've discovered some neat things (with my version of the code at least) of bugs and kind of just interesting artifacts. 1.) If you click a tower to place and click another tower to place, (if you have enough money) they will stack and it makes 2 towers in the same place. 2.) If you have enemies coming into the range, the tower instantly shoots if it is the only enemy in range. Therefore, the tower can attack faster with a "worse spot" on the map barely having any range than just having batter range for right as the enemy spawns. 3.) Your towers can attack when the enemy is off screen, like if you extend the end path for longer than the map, and if the tower can reach that section, then the tower continuously attacks there until it is dead, so you can go onto the next wave. Which is why it is important to have a game over screen if the enemies reach the end of the track.
@lidedn7555 Жыл бұрын
Dude, the first problem is easy to solve. Just check the box "solid" on all towers and in "step" write this: if(place_meeting(x,y,oCaminho) or not place_free(x,y)) //place_free(x,y) checks if there is any solid object in the specified coordinate, in this case touching our object { color = c_red; } else { color = c_white; }
@larryteslaspacexboringlawr7397 жыл бұрын
thank you for gamemaker video
@froggothecommentator80365 жыл бұрын
Can you please make a part 4 about tower upgrade
@CornerBlimkie Жыл бұрын
Can you make an episode on making different types of enemies for the towers to shoot at? That would help me out so much!! Love your content btw, keep up the good work🙂
@epiczeven63786 жыл бұрын
wow! a fully working td in 1 day. I´m very impressed, Thank you so much for this :)
@PhoenixLondon6 жыл бұрын
my enemies keep coming in before the previous wave is killed, what did I forget to do???
@AndrewLeksche6 жыл бұрын
Alarm 1 for Obj_Enemy "if (instance_number(obj_enemy)
@ItsNat21_6 жыл бұрын
I know this tutorial is old, but you should've made the towers snap to a grid or something like that, to make it semi-neat
@sunstreak_games7 жыл бұрын
This set of tutorials was really helpful! Someone made a FOURTY PART tutorial for tower defense and I think that this is way better. With this, you're just setting up the basics of gameplay and you're free to do whatever you like with the rest of it. With the other one there is a lot less you can do because pretty much everything is already done for you. I have been adding a bunch of stuff to the project I'm working on while waiting for this part. Also I'm really happy that you put my idea into the video! Thanks for the tutorials!
@minegamerzado2115 Жыл бұрын
can you send the part 4 video?
@Vertech_6 ай бұрын
@@minegamerzado2115 He said someone else made a 40 part series, not a 4th part to this
@ns_ml1377 жыл бұрын
FINALLY I WAS WAITING FOREVER thanks for the series
@comedycrash76697 жыл бұрын
2nd
@Nurk0m0rath2 жыл бұрын
I'm surprised you used object parenting but didn't even mention the benefits of doing your code in the parent object. You could have done all your game logic coding *once*, in the parent, and had the different towers simply inherit that functionality. Literally the only things you'd have had to change from the parents would be the objects created by the click and drag and the range and attack speed of the placed towers, along with the sprites of everything. You could have even used the tower 1 set as the parent, rather than creating an extra object. I mean, for this project I get that parent coding wasn't necessary, but this is a tutorial and the more complex the logic and the more variants that exist, the more valuable parent coding becomes.
@jonathanmaynard25517 жыл бұрын
RealTutsGML can you please do another Java game development series and have it be a survival game? If so can you also have it contain a procedural 2D terrain generation plz? Thanks
@williamsfamily39477 жыл бұрын
I really appreciate your tutorials and your commitment to this channel. I know you have been under criticism but don’t give up! So much blood is SUPER fun! People who don’t understand it are just that, people who don’t understand it. Thank you so much. See you in the next tutorial.
@TylerH695 жыл бұрын
Please can I put in a request... Please could you make a tutorial where you can have a start menu and a closing menu?
@psirenvct4 жыл бұрын
thank you for this tuto mate, that's the perfect way to dive in the game's coding world!
@andreasnara5 жыл бұрын
after my tower wiped all of my enemy, the second wave started but it only spawn one enemy, not six. Can someone help? I did everything the same way as the video says
@JonathasCosta3 жыл бұрын
Awesome tutorial. Congrats!
@owenhobbs17587 жыл бұрын
first
@scratchnmix95114 жыл бұрын
Very nice and concise series. I wish you went more in depth on polishing aspects of it like animation/sprites as well as different enemies and more weapons.
@0kr4m2 жыл бұрын
is it just for me but the parent object isn't working :/
@hotgates93247 жыл бұрын
Thanks for this great tutorial. Question. Is there a way to create a script that checks where the path is to see if we can place a tower or not, instead of using objects?
@MyGameplay6 жыл бұрын
how to add background sound,how to ad a new map if i killed 20levels or so,so many things to do xD u ever end this project?
@TylerH695 жыл бұрын
Hi just to recommend Shaun Spading for sound. Have a look at the Platformer Tutorial that he created and there's a whole tutorial on adding sounds :-)
@diegohorseman1527 жыл бұрын
Hello! Great Video! How can i create an .apk??
@destroyergaming52054 жыл бұрын
how would you add 2 different enemy types
@zitnya33482 жыл бұрын
it works but for some reason enemies will stop to spawn after round 24. Anyone knows why?
@SirFeeshy6 ай бұрын
I think it just crashes the game, so you can try and code it so that once you get to that wave they win the game or something.
@samuellimin1615 жыл бұрын
in the last part when I run tower 1 2 and 3 it doesn't shoot and kill the enemy all the scripts are correct, where is the mistake sir? Please help
@TylerH695 жыл бұрын
I've literally just looked at that tutorial Samuel and my games perfect. If you look carefully, you will see that you have an error - probably either spelling or grammar area :-)
@tofustar65663 жыл бұрын
11:00
@davidyarbor30254 жыл бұрын
thank you this was great
@ns_ml1377 жыл бұрын
7;31 is were i am on
@tpmjr427 жыл бұрын
3rd
@شوقالرجيعي6 жыл бұрын
Youuuuuu are awesome
@egorleonidov9637 жыл бұрын
cool video
@senjecko7 жыл бұрын
Good lesson
@ibrahemmoo7 жыл бұрын
why mouseOver doesn't work with me. it became a variable i don't no why? and it doesn't appear in the list of the functions any help?
@RealTutsGML7 жыл бұрын
+ibrahem hilabi We're creating the script in the video. mouseOver is not a built in function. Rewatch the video to see how we made the script
@ibrahemmoo7 жыл бұрын
I understood. I forgot to name the script thx
@danisob36335 жыл бұрын
lul
@romeorenolla42037 жыл бұрын
can i use this codes for java netbeans?
@stitch59006 жыл бұрын
really? No
@clarencehernandez66065 жыл бұрын
How can i put the towers in perfect grid. Because I want the tower to snaps to grid. How can I do that? Pls help me
@RealTutsGML5 жыл бұрын
You can add this code to the create event of the tower move_snap(32, 32);
@clarencehernandez66065 жыл бұрын
Tnx. Sir
@draedlordion3 жыл бұрын
@@RealTutsGML This didn't work, i've tried to place it in oTower1(2,3), in oTowerParent, in oTower (draggeds) none snapped to grid
@IvanKasic6 жыл бұрын
what did he do or what key did you press at 9:09 to do that with the code????? HALP
@emersonyoung1976 жыл бұрын
You've most likely figured it out by now, but in case anyone else is unsure it's the TAB key :-) 1.bp.blogspot.com/-i27bDhtC3W4/V6OFssc0LzI/AAAAAAAAAAM/8h50xEjKhu4xnKGEbhP7-6w_QosloOjBQCLcB/w1200-h630-p-k-no-nu/tabkey.png
@SirFeeshy6 ай бұрын
Tab
@maxdawson11665 жыл бұрын
for some reason once i get to level 20 the game breaks and no enemies spawn
@AMosesPresents5 жыл бұрын
mine does as well, did you ever fix this?
@krainagracza97754 жыл бұрын
@@AMosesPresents i have same problem :/
@andreasnara5 жыл бұрын
my second wave only spawn 1 enemy rather than 6 help
@froggothecommentator80365 жыл бұрын
Maybe you need to reset the enemy count
@alextasarov13413 жыл бұрын
I had a typo in the spawn_count = 0; but it didn’t tell me. It took me a while to figure out why xD
@Zyrex2166 жыл бұрын
how would you make some enemies to spawn at a 2 different areas like 5 go left 5 go right i tried making new enemys the towers couldnt focus both it got confused
@karuto30133 жыл бұрын
The enemy dont die....
@nutboybootiecoot74646 жыл бұрын
I have a question, if I have two different enemy's at once(oEnemy1 and oEnemy2) in the range of a tower the tower will continue to shoot the first target(oEnemy1) then when the target is killed it will never lock on or shoot oEnemy1 instances, and will lock on the oEnemy2 and shot. But the problem to that is it will disregard Alarm0 and rapid fire oEnemy2. Could you help me with this?