Tower Defense Game Tutorial
#61
Posted 30 April 2010 - 07:24 PM
I managed to create 2 more bullet tipe of towers
I have 6 tipes of enemyes (3 normal enemyes, 1 fast, 1 minibos, 1 boss)
But now I got stuck!
I was tring to make 2 more tipes of towers(this time lasers) And I dosn't work!
One of them ... if you click the buy button is put's the tower where the button is.
The other one can't be selected. If I clck on it nothing hapenes. No circle arund him, no upgrades, nothing.
And they were nothing more than direct clones of the laser tower(and yes, I replace every "ob_tower_laser" with my tower but it still dosn't work)
#62
Posted 01 May 2010 - 01:29 AM
#63
Posted 01 May 2010 - 08:12 AM
cant TD (tower defense) be confused with TD (top-down)... just putting it out there, or am i wrong?
well, when someone makes a Top-Down, they put infront of the name, if its a shooter or w/e. TDS... I have never seen anyone saying TD for a Top down game. Only TDS
#64
Posted 09 May 2010 - 01:50 AM
What codes do you need to see to help?
Also, the waves don't work, they just constantly send, and i don't get money from killing.
#65
Posted 09 May 2010 - 02:26 AM
#66
Posted 16 May 2010 - 11:58 PM
here's what i got so far
#67
Posted 20 May 2010 - 12:35 PM
#68
Posted 09 July 2010 - 09:30 PM
I'm new with game maker and I'm making my first game. I used this tutorial to set the basics and it helped me a lot, thx!
#69
Posted 10 July 2010 - 12:37 AM
#70
Posted 30 July 2010 - 04:16 AM
#71
Posted 05 August 2010 - 02:46 PM
This is the code to make the object point to a specific point:How do you animate the tower to 'follow' the monster it's targeting? Kinda like it got it's target locked?
I'm new with game maker and I'm making my first game. I used this tutorial to set the basics and it helped me a lot, thx!
direction=point_direction(x,y,object?.x,object?.y)If you want the object's angle to change, create an end step event and put in the transform sprite action (pro) and set the angle to the direction. Otherwise, if you use lite and your sprite has equal height and width, just make a sprite with 360 images (using the animate menu and then choose "Rotation seguence > Clockwise" and choose 360 frames+degrees) and then set the image index (image_index) to the direction.
#72
Posted 22 August 2010 - 05:28 PM
#73
Posted 23 August 2010 - 12:00 AM
#74
Posted 26 August 2010 - 08:14 PM
#75
Posted 12 September 2010 - 11:17 AM
#76
Posted 12 September 2010 - 11:32 AM
look 4 posts up ... some times it really pays to read the posts and not just ask straight awayHow would i make the turret angle change so it always follows the target? (i am a GML noob
)
#77
Posted 12 September 2010 - 12:24 PM
I tried that but when i play the game it comes up with an error which says:look 4 posts up ... some times it really pays to read the posts and not just ask straight away
How would i make the turret angle change so it always follows the target? (i am a GML noob)
Error in code at line 1:
direction=point_direction(x,y,obj_enemy.x,obj_enemy.y)
^
at position 41: Unknown variable x
please help
#78
Posted 21 September 2010 - 10:21 PM
if instance_number(Name Of Enemy) > 0
{
nearest = instance_nearest(x,y,Name of Enemy);
image_angle = point_direction(x,y,nearest.x,nearest.y);
}and this into the draw code
draw_sprite_ext(sprite_index,image_index,x,y,1,1,image_angle,c_white,1)
this should make your turrets face your enemie when shooting(tip you dont need to edit sprite just make sure its facing right
#79
Posted 11 October 2010 - 01:27 AM
its seems the towers ignore it completely
Good tutorial btw, it helped alot.
#80
Posted 11 October 2010 - 01:32 AM
How do i make it so that when a different enemy comes the towers shoot at it.
its seems the towers ignore it completely...
Good tutorial btw, it helped alot.
Oh btw i tried to use this:
{
var ii, dist, xx, yy;
if firing > 0 firing += 1;
if firing >= 30/rate firing = 0;
if not instance_exists(target) target = noone;
if instance_exists(ob_enemy)
if instance_exists(ob_enemy2)
{
if target = noone target = instance_nearest(x,y,ob_enemy);
if target = noone target = instance_nearest(x,y,ob_enemy2);
if point_distance(x,y,target.x,target.y) > range
target = noone;
...
The towers dont seem to know the second enemy(type) is there...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











