Let's Make a Tower Defense Game - Week 10 - More Levels, Finally

Channel:
Subscribers:
8,930
Published on ● Video Link: https://www.youtube.com/watch?v=t4nSu5CmQf0



Game:
Duration: 17:20
802 views
12


A video on adding new levels!

The download:
http://www.mediafire.com/download/dkycjv487zc9yim/TowerDefenseWeek10.gmz

The explanation from about 15:45 in the video:
The alarm for moving to the next room was being set off when the final enemy was being SPAWNED, rather than when the final enemy was KILLED. Which could lead to the obvious problem of moving to the next map while there are still enemies on the screen, if you're not able to eliminate them quickly enough.

To do that, I moved the code to set Controller.alarm[1] to the "death checks" in the Enemys' End Step events; instead of setting the alarm, the Controller will set a variable "finished" to true when it spawns the last enemy, and enemies will check that Controller.finished equals true and if there are no more enemies on the screen (via the instance_number(object) function), and if those conditions are met THEN it will set Controller.alarm[1] to room_speed.

Additionally, to minimize the amount of duplicated code, I made something similar to the enemy_start script for enemy_death; it contains all of the code that will run every time an enemy dies, which so far includes giving you money and checking if you should move to the next map.
- - - - -
That promised social media link spam.
https://twitter.com/DragoniteSpam
I do live streams sometimes!
http://www.twitch.tv/dimenticare

Rate, comment, subscribe, watch more, enjoy!







Tags:
2andaHalfStooges
yt:stretch=16:9
DragoniteSpam
game maker
game programming
game design
game maker studio
gms
how to make a video game
game maker tower defense
make tower defense game



Other Statistics

I Wanna Be the Guy Statistics For DragoniteSpam

DragoniteSpam presently has 802 views for I Wanna Be the Guy across 1 video, with his channel publishing less than an hour of I Wanna Be the Guy content. This is less than 0.02% of the total video content that DragoniteSpam has uploaded to YouTube.