Jump to content


Photo
* * * * * 3 votes

Tower Defense Game Tutorial


  • Please log in to reply
111 replies to this topic

#1 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 06 April 2008 - 06:33 PM

Replies to topics in this forum are held to a high standard. Reviews must have a critique or suggestion for use to be approved. Read the rules here.

This is a new version


  • Tower Defense Game Tutorial
  • A full tutorial for basic TD games
  • Can be GM 6 or 7
  • Lite is okay, but pro is better
  • The file is a .zip file
  • Posted Image text link
  • 0.64 MB
  • To use this tutorial, you need some experience with GML, particularly about instances. The file is a zipped file containing a Word document and four editable example files.

Some time ago, I made the TD game Interceptor. After that, I got some questions about how I made it. That inspired me to make a tutorial about TD games. And this is it: I'll explain you how to make the key components for a well-working TD game. There are also some codes you can copy to your own GM file. If you have finished the tutorial, you have a game consisting of two towers, enemies following a path, a tower building system and a wave system, which could be a very nice TD game if it was a little better. Don't expect a full Onslaught clone :P , but it can still lead to great results.


Good luck!

Edited by athanatos, 10 October 2008 - 07:25 AM.

  • 1

#2 Baily

Baily

    GMC Member

  • New Member
  • 218 posts

Posted 09 April 2008 - 01:11 AM

Wow! Clearly you know how to make a tutorial! The Word Document is always a nice touch, and the system is awesome! 10/10! But one problem though, is that it's pretty hard to put into another game.
  • 0

#3 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 10 April 2008 - 09:29 PM

Has anyone read the lightning tutorial yet? I have, and it looks pretty good. Maybe you can use it in your TD game for your own towers. <_<
  • 0

#4 @Alex@

@Alex@

    GMC Member

  • GMC Member
  • 4586 posts
  • Version:Unknown

Posted 12 April 2008 - 01:46 PM

good tut, the varibles could be set in code as it seems alot was D&D, i may just use this.
  • 0

2mma14z.jpg 2nu6efl.jpg 28whvdt.jpg


#5 smartgenius

smartgenius

    GMC Member

  • New Member
  • 46 posts

Posted 13 April 2008 - 06:30 PM

Good tutorial! The word document is great. You should probably start commenting where all the codes go though, I kept accidentally putting codes that were supposed to go into the draw event into the step event.
  • 0

#6 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 14 April 2008 - 09:25 PM

ATTENTION:
The Word-document and the fourth file have been changed. I changed the wave system; now it uses arrays in the system. That will make the game probably better for players in higher levels.

  • 0

#7 joshuarobillos

joshuarobillos

    GMC Member

  • GMC Member
  • 195 posts
  • Version:GM:Studio

Posted 16 April 2008 - 08:03 AM

Well using your click and place turret skills, i can put that and use it into my rts game! ty
  • 0

#8 da man7

da man7

    GMC Member

  • New Member
  • 16 posts

Posted 16 April 2008 - 09:49 AM

Great tutorial! this is one of the best I have ever seen! 10/10!!
  • 0

#9 Supertramp

Supertramp

    GMC Member

  • GMC Member
  • 353 posts

Posted 18 April 2008 - 12:06 PM

you could add an upgrade system to this to make it even better.
one thing- it doesnt say the price of the tower before you buy it
  • 0
My examples:
Lightning Effect
Simple Minimap
Did I help you on something? PM me so i know
Click here to grow my city

#10 LimmingKenny

LimmingKenny

    GMC Member

  • New Member
  • 422 posts

Posted 19 April 2008 - 07:19 PM

The way the game is right now, it gets impossible to win around wave 68:
Posted Image
  • 0

#11 ssbtoday

ssbtoday

    GMC Member

  • New Member
  • 72 posts

Posted 19 April 2008 - 07:54 PM

make it so when you press space that it will set the wave time zero 0 and send the next round
  • 0

#12 2936hm

2936hm

    GMC Member

  • New Member
  • 63 posts

Posted 20 April 2008 - 02:14 PM

May you tell me how to set the 'just created' instance to follow the path and set a specific health??
I don't want to have a game crowded with different same object.
But anyway, your tutorial is great. It tells amost all things you need in a td. Well Done. 10/10
  • 0

#13 dark waffle

dark waffle

    GMC Member

  • New Member
  • 47 posts

Posted 20 April 2008 - 05:32 PM

is it posibble to make an enemy that will randomly spwan with the red enemys but no as much?

i want a enemy that will shoot at the turrets but only 2 or 3 appear in 1 wave
  • 0

#14 abecedariandude

abecedariandude

    GMC Member

  • New Member
  • 511 posts

Posted 22 April 2008 - 12:09 PM

I'm making a TD game right now. Awesome. This is just what I need. And with an easy and readable word doc! Gud job! <_<

Could you make it have a number of rounds? Like levels? That would be awesome. This is just wat i need by the way. Good Job!
  • 0
<div align='center'><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo--><a href="http://gmc.yoyogames...owtopic=398248" target="_blank">Pokemon Eclipse</a><!--sizec--></span><!--/sizec-->

| <u><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->Latest Release: <b>Project halted, source is now available - 11th July 2010</b><!--colorc--></span><!--/colorc--></u> |</div>

#15 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 28 April 2008 - 08:31 AM

is it posibble to make an enemy that will randomly spwan with the red enemys but no as much?

i want a enemy that will shoot at the turrets but only 2 or 3 appear in 1 wave


Well you could try to add this to the code of the wave system. Erase the part from the comment:
//Check the wave time and calculate how many enemies should be created
//Create the arrays for the next wave.
until the line
wave_enemies[e] -= 1; }}}}
The brackets are not like that, remember!
But first make a second enemy (that will shoot at the turrets) called ob_enemy2.
//Check the wave time and calculate how many enemies should be created
	//Create the arrays for the next wave
	globalvar ee,extra;
	if wave_time[wave] = 600
	{
		wave += 1;
		wave_time[wave] = 0;
		wave_enemies[wave] = 5+floor(wave*0.4);
		ee[wave] = wave_enemies[wave];
		extra[wave] = round(random(2))+1;
	}
	//Create enemies if needed for every array
	for (e = 0; e < wave+1; e += 1)
	{
		if wave_time[e] < 600 wave_time[e] += 1;
		if wave_enemies[e] > 0
		{
			if wave_time[e] = (ee[e]-wave_enemies[e])*15+15
			{
				if extra[wave] > 0
				{
					instance_create(-32,0,ob_enemy2);
					extra[wave] -= 1;
				}
				else
				instance_create(-32,0,ob_enemy);
				wave_enemies[e] -= 1;
			}
		}   
	}
}
It may not seem very different, but there are a few things different here: there is a new variable extra (which also works with arrays), and this works nearly the same as the variable wave_enemies, but it indicates the amount of ob_enemy2 that has to be created.
If you've added this, the system will randomly create 1,2 or 3 new enemies, using the variable extra, without making the total amount of created enemies different.
I hope this solves your problem. Else, tell me :(
  • 0

#16 giggdaw

giggdaw

    GMC Member

  • New Member
  • 38 posts

Posted 01 May 2008 - 11:10 AM

Yeah, this is probably the best tutorial ever seen xD
A few things mentioned before would be good, like the upgrade system and showing the price of towers when mouse hovers over it. And there should be more towers.
But to everyone... This is a tutorial, not a full game. He shows the basics, you figure out the rest. :D
  • 0

#17 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 03 May 2008 - 12:13 PM

This is an awesome tutorial!! Just one thing, is is possible to cancel building a tower. eg i press the button to build tower 1 but then i change my mind and dont want to build that tower. Is there a cancel button?

by the way I got to lvl 70

Posted Image
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#18 SONIC_LUIGI15

SONIC_LUIGI15

    GMC Member

  • New Member
  • 2 posts

Posted 03 May 2008 - 12:44 PM

I am having trouble adding new towers and there buttons.

Great tutorial! 10/10. I love Tower defense!
  • 0

#19 frog

frog

    GMC Member

  • New Member
  • 228 posts

Posted 11 May 2008 - 06:19 PM

i got to wave 70 too

Posted Image

and very nice tutorial just a shame it isnt completly in gml
  • 0


Game Maker 8 Pro
-------------------------------------------------------------

YAY NEW WEBSITE !
Click to visit my website

#20 fergyvivapinata

fergyvivapinata

    GMC Member

  • New Member
  • 98 posts

Posted 20 May 2008 - 02:11 AM

very nice one :( i also edited the game but gonna give credit, i added these things
rocket tower
freeze tower
sound tower
light tower
two player towers
music

thats it so far
  • 0

#21 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 20 May 2008 - 03:00 PM

very nice one :) i also edited the game but gonna give credit, i added these things
rocket tower
freeze tower
sound tower
light tower
two player towers
music

thats it so far


Ok very good! Tell me when it's finished, I'm surely going to play it :GM072: .
  • 0

#22 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 09 October 2008 - 06:50 PM

OK people: this is a new version with an upgrade system. Hope you like it!
  • 0

#23 KymcoCobran

KymcoCobran

    GMC Member

  • New Member
  • 329 posts

Posted 09 October 2008 - 08:04 PM

were is the link ?

Edited by KymcoCobran, 09 October 2008 - 08:04 PM.

  • 0

#24 Chronic

Chronic

    Administrator

  • Global Moderators
  • 2729 posts
  • Version:GM:Studio

Posted 09 October 2008 - 08:15 PM

The link is there but host-a.net is down or something so the image link isn't showing up.
  • 0

My recent tutorials: [Auto-Tiling] [Text Based Menu] [Sprite Based Menu] [View more at my site]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
R.I.P Mom (1951-2008)


#25 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 10 October 2008 - 07:26 AM

Yes, I guess that was the problem. But now it works again.
  • 0

#26 ArchDD

ArchDD

    GMC Member

  • New Member
  • 11 posts

Posted 20 November 2008 - 07:33 PM

rly nice 10/10
that helped alot dude!
i never had so much fun playing a example before lol
got up to wave 170 with all red lasers at lvl5
  • 0

#27 the sivart

the sivart

    GMC Member

  • GMC Member
  • 150 posts
  • Version:GM:Studio

Posted 21 November 2008 - 03:00 AM

sweet ;)
  • 0

I am "The Sivart" and I like to make tutorials on youtube >> Posted Image << I am "The Sivart" and I like to make tutorials on youtube


#28 Slickdc

Slickdc

    GMC Member

  • New Member
  • 176 posts
  • Version:GM:HTML5

Posted 03 December 2008 - 01:44 AM

Is it O.K if I use some of these codes (Altered a bit) in a game that I might sell if I put you (athanatos) in the credits?
  • 0

#29 Potado

Potado

    GMC Member

  • New Member
  • 401 posts

Posted 03 December 2008 - 03:26 AM

there is no gm6 version!
  • 0

#30 ninootju

ninootju

    GMC Member

  • Validating
  • 81 posts

Posted 26 December 2008 - 12:22 PM

Thanks for this wonderful tutorial!

I have one question; I just made some more towers, but whenever I try to click on the placed tower (to open the little menu, to upgrade / sell them), the menu doesn't show up, but the circle around the tower does.

What's the problem with this?

Edited by ninootju, 26 December 2008 - 12:22 PM.


#31 joffysloffy

joffysloffy

    GMC Member

  • GMC Member
  • 21 posts

Posted 03 January 2009 - 01:39 PM

Great tutorial!

In some posts before, I saw that a few people tried to reach the highest, reachable wave. Now with the new up-grade system, I tried that too and I reached wave 220 ^_^!
Max_level_TD_tutorial.bmp (1.2 MB)

I actually found some flaws in the tutorial with the depth. The bullets should have a lower depth, because they are underneath the towers, which looks really weird. And sometimes the laser of the lasertower gets underneath another lasertower, so that also looks really weird, but I think I have found a way you can solve that. Just check the distance to its target and multiply that by -1. So if a tower is next to the path and a tower is behind that one. Then the tower behind the tower that is next to the path will have a lower depth than that tower, so its laser will be on top of the tower that is next to the path.
I hope you hear what I am saying ^_^.

Joffysloffy.

Edited by joffysloffy, 03 January 2009 - 04:14 PM.

  • 0

#32 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 17 February 2009 - 10:42 PM

Hello everyone, I'm sorry I haven't answered the replies earlier, but I'm no longer making games. That also means I'm not checking this forum anymore. I can, however, still answer questions about GM that have to do with TD games, but in that case you better PM me. I'm not sure if I'll visit the forum another time, unless I get a PM.
I'll answer the questions posted above.

Is it O.K if I use some of these codes (Altered a bit) in a game that I might sell if I put you (athanatos) in the credits?

Sure.

I have one question; I just made some more towers, but whenever I try to click on the placed tower (to open the little menu, to upgrade / sell them), the menu doesn't show up, but the circle around the tower does.

What's the problem with this?

The circle is drawn by the tower itself. But the menu stats are drawn by the controller. It might be possible that the 'ii_select' variable isn't set when you select the tower, since the tower stats, and the other buttons are only drawn if this variable is set correctly.

I actually found some flaws in the tutorial with the depth. The bullets should have a lower depth, because they are underneath the towers, which looks really weird. And sometimes the laser of the lasertower gets underneath another lasertower, so that also looks really weird, but I think I have found a way you can solve that. Just check the distance to its target and multiply that by -1. So if a tower is next to the path and a tower is behind that one. Then the tower behind the tower that is next to the path will have a lower depth than that tower, so its laser will be on top of the tower that is next to the path.
I hope you hear what I am saying tongue.gif.

You're right. That should do the trick. But the depth of the tower must be reset to its original value afterwards, and objects that might fly over the tower, like bullets or missiles, should have a much higher depth value (like 800 or 1000) or the tower will be drawn above them.
  • 0

#33 DarkLopo

DarkLopo

    GMC Elite

  • GMC Member
  • 891 posts
  • Version:GM8

Posted 20 February 2009 - 01:43 PM

:lol:
___________________________________________
ERROR in
action number 1
of Step Event
for object btn_upgrade:

Error in code at line 4:
if controller.ii_select = noone

at position 20: Unknown variable ii_select

What to do? I did same things than you, but in the example it works, but in my game it doesnt.

Ps really nice game, 10/10 on tutorial : )) but could you help me? Same happens at btn_sell... : (
  • 0

bt2.png


#34 DarkLopo

DarkLopo

    GMC Elite

  • GMC Member
  • 891 posts
  • Version:GM8

Posted 20 February 2009 - 01:46 PM

:(
___________________________________________
ERROR in
action number 1
of Step Event
for object btn_upgrade:

Error in code at line 4:
if controller.ii_select = noone

at position 20: Unknown variable ii_select

What to do? I did same things than you, but in the example it works, but in my game it doesnt.

Ps really nice game, 10/10 on tutorial : )) but could you help me? Same happens at btn_sell... : (


Problem fixed, forgot to add controller in room :lol:
  • 0

bt2.png


#35 Hardly

Hardly

    GMC Member

  • New Member
  • 40 posts

Posted 20 February 2009 - 05:23 PM

What do you say about people getting those codes and changing them?

I mean, about using your example as a base for a much higher detailed game.

I would give credit for sure
  • 0



#36 fligamaflogamus

fligamaflogamus

    GMC Member

  • GMC Member
  • 60 posts

Posted 25 February 2009 - 01:37 PM

Great tutorial!

Although I cant seem to understand how the enemy speed is being controlled.
I want to create a tower that fires blobs that slows the enemy it comes into contacts with, how would i do this?

Im using the free version of gamemaker 7
  • 0
I am a in the GM Quiz!

#37 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 28 February 2009 - 03:05 PM

What do you say about people getting those codes and changing them?

I mean, about using your example as a base for a much higher detailed game.

I would give credit for sure

If you give me credit, then it's okay to use it, even in a competition game (unless it's just a rip-off from this tutorial, it must be your own game).

Great tutorial!

Although I cant seem to understand how the enemy speed is being controlled.
I want to create a tower that fires blobs that slows the enemy it comes into contacts with, how would i do this?

Im using the free version of gamemaker 7

That's got to do with the path speed. The enemies don't have any 'speed'. If you want to change the speed with which they move through the path, you need to change the 'path_speed' variable.
  • 0

#38 fluidic ice

fluidic ice

    GMC Member

  • GMC Member
  • 812 posts
  • Version:GM:Studio

Posted 01 March 2009 - 12:55 AM

Haha! New Record, Beat this:
Posted Image
Yep i'm addicted too :P

I don't know how i could use this in my TDS, but I could make it into an automatic turret. . . . .

Nice Example though!

Edited by fluidic ice, 01 March 2009 - 12:58 AM.

  • 0

Try out my game Point of Contact: Here (New Tab)

Or check out my music! Here
newsigcg.png


#39 DJ J4KE

DJ J4KE

    GMC Member

  • GMC Member
  • 142 posts

Posted 02 March 2009 - 04:36 PM

I've created a new type of enemy, How do I make it so that only that enemy can spawn in that room? All the enemies are spawning and I only want that particular one!

I have GM7 lite.
  • 0

#40 athanatos

athanatos

    GMC Member

  • New Member
  • 25 posts

Posted 07 March 2009 - 03:33 PM

I've created a new type of enemy, How do I make it so that only that enemy can spawn in that room? All the enemies are spawning and I only want that particular one!

I have GM7 lite.


You mean that you want the new enemy only to be created in a particular room, while the amount of enemies to be created remains the same? Then you could write this (in the script 'get_wave_enemies'):
//Create enemies if needed for every array
	if wave_time < 600 wave_time += 1;
	if wave_enemies > 0
	{
		if wave_time = (ee-wave_enemies)*15+15
		{
			if (room == <the new room>)  instance_create(-32,0,<new enemy));
			else instance_create(-32,0,<old enemy));
			wave_enemies -= 1;
		}   
	}
instead of the code that was below "//Create enemies if needed for every array". If all enemies were created instead of this one, you probably forgot to use the 'else'-statement.
  • 0

#41 UltimateGaming

UltimateGaming

    GMC Member

  • New Member
  • 121 posts

Posted 08 March 2009 - 11:43 AM

nice tut...i got to wave 534...i had it minimised and forgot i was playing...

anyway...i changeed the highest level of each tower to 100...when they got there they were doing 9459358(something like that) damage...lol
  • 0
I have quit the GMC.

#42 morbis

morbis

    GMC Member

  • New Member
  • 4 posts

Posted 19 March 2009 - 11:13 PM

This is a great tutorial! I was wondering if you could throw in a pro one where the turrets aim towards the enemies.
  • 0

#43 funlerz

funlerz

    GMC Member

  • New Member
  • 113 posts

Posted 20 May 2009 - 02:03 PM

please add a mirror, the main download on the page doesnt load the download for me, and metalink download starts downloading but cant find the program.

Edited by funlerz, 21 May 2009 - 11:59 AM.

  • 0

#44 razourik

razourik

    GMC Member

  • GMC Member
  • 1871 posts
  • Version:Unknown

Posted 30 May 2009 - 11:31 PM

This is an excellent tower defense engine! ;) I just wish that there was a button you could press to release the next wave, and if possible also a code that makes the new wave's enemies have the next enemy subimage so that all the waves wouldnt look the same. But other than that, great job!
EDIT: How do I make the small explosions get created when the laser hits the enemy? ^_^

This is a great tutorial! I was wondering if you could throw in a pro one where the turrets aim towards the enemies.


That could be easily done in unregistered too...

Edited by razourik, 31 May 2009 - 11:45 PM.

  • 0
Posted Image

#45 Manuel542

Manuel542

    GMC Member

  • New Member
  • 9 posts

Posted 11 June 2009 - 02:02 PM

Thank you so much i learned alot from this! :) :D B)
  • 0

#46 razourik

razourik

    GMC Member

  • GMC Member
  • 1871 posts
  • Version:Unknown

Posted 14 June 2009 - 11:45 PM

This is the amount of progress I've made on the td tut to make my own game: ;)
Razourik's TD tut
Check it out, theres lots of things to be learned from it that werent in the original tut. :P
  • 0
Posted Image

#47 RedSoxFan

RedSoxFan

    GMC Member

  • New Member
  • 42 posts

Posted 24 June 2009 - 03:44 PM

Awesome Tutorial!
Can you explain to me how to create these 2 features?
1. when the user presses say the delete key the tower selected from the menu that hasn't been placed yet will be destroyed and the price of the tower will go back into money.

2. stun the enemy for 5 sec then go back to normal speed without getting off the path.

Thanks
RedSoxFan

EDIT: Nevermind fiqured it out

Edited by RedSoxFan, 24 June 2009 - 11:10 PM.

  • 0
Vista x64 | Game Maker 7 & 8 Pro | Firefox ~ Chrome
Date & Time Utility - Link

#48 Kubanen

Kubanen

    Vipers

  • GMC Member
  • 1723 posts

Posted 24 June 2009 - 03:53 PM

Awesome Tutorial!
Can you explain to me how to create these 2 features?
1. when the user presses say the delete key the tower selected from the menu that hasn't been placed yet will be destroyed and the price of the tower will go back into money.

2. stun the enemy for 5 sec then go back to normal speed without getting off the path.

Thanks
RedSoxFan

ask in novice?
  • 0

I support

For its awesome gameplay & graphic style

#49 buzzy

buzzy

    GMC Member

  • New Member
  • 6 posts

Posted 06 July 2009 - 09:21 AM

Your tutorial is VERY COOL! :blink:
This is really good, and I will give you credit for the game, but i need some help.

How do you make enemy waves different,
for example 12 bombs come on wave 1 and wave 2 30 bombs and 15 blue bombs come and on wave 100, about 1000 rainbow bombs, 500 yellow bombs, and so on.
How do you have multi-enemy waves?

How do you make flame tower fire like using the particle function. It shoots out fire rapidly.
How do you make a ice blower tower. I make a single ice particle sprite and make it into a blower which blows lots of ice particles. It is still but targets bombs.

How do you make a tower rotate in the enemies direction?
How do you make a tower shoot; not one enemy but lots. When i put different types like red, blue, yellow, rainbow, white bombs, they only get the red bomb?? I want them to target every single type.

How do you make spikes. You can only place them on the path and they do not fire. They stay there and destroys upto 10 bombs and then it's gone.
A different upgrade system; like instead of upgrading to lvl 1 and all that, you could upgrade to example: "FROST TOWER" upgrade to PERMA FROST or FAST FIRING or FROST BOMBS?
Instead of a wave counter, could you have no, just a start round button? When a whole wave is finished, the start round button appears.
When your mouse hovers a button like THE FROST TOWER, a description appears like FROST TOWER, includes power and rate of fire.
A booster. If you place them near towers, they increase the surronding towers (in it's radius) power.
Bombs multiplying. If a black bomb is destroyed, if a blue bomb is destroyed, a black bomb appears just like in bloons tower defense how a blue bloon pops into a red bloon.
Screen clear function: If you click on like blackhole, a blackhole will appear in the center of the screen and suck up lots of bombs for 10 seconds.
Or if you activate "Atom BOMB" it clears the whole screen.

Grenade thrower. If bombs come, it starts spinning really fast shooting out 1 grenade every 2 millisecond at the enemy. But the grenades are very weak.

Immunities, like if you place an ICE BLOWER, it doesn't effect an ice bomb or if you place a FLAME TOWER it doesn't effect Fire bombs.

4 direction shooters. If you place one of these, it will shoot in all 4 directions at the enemy. good in corners.

How do you do all that? I tried, it didn't work.

Edited by buzzy, 06 July 2009 - 09:29 AM.

  • 0

#50 buzzy

buzzy

    GMC Member

  • New Member
  • 6 posts

Posted 07 July 2009 - 05:18 AM

How do I make the small explosions get created when the laser hits the enemy?


OK. To make small explosions appear when the laser hits the enemy, you need a explosion sprite. If your LASER projectile is an object, in "Collision with enemy" event add the Destroy the instance to enemy. And add another event " DESTROY" and then add in Create Instance of explosion 0, 0, relative, but you will need an explosion object. And then add Animation End into the event FOR the explosion and then add destroy the instance to SELF. ;) I hope this helps you!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users