For this week of game design I have been working on my character shooting, enemies taking damage scripts as well as a couple of particle effects for when my dragon and arrow gets destroyed.
This is my sprite for the pixels of my arrow of when it gets destroyed, I used grey pixels for the colour of what my arrow tip colour is.

This is my dragons death pixels for when the dragon is killed I used a red colour for the main colour of my dragon as well as a darker shade of red of pixels as well for the different shades of the dragon which was there before it got destroyed.
![]()
I have mostly for this week been working on my first main bit of code for my game making my character able to shoot at the enemy as well as the enemy take damage and die. When I was doing this I ran into a few errors when making this as I had quite a few bugs at the start which I needed to fix, I did not manage to fix them all but I will continue to work on fixing each one of the bugs as the weeks progress each time I make a new script new bugs will come up. The bugs which came up which I managed to fix or at least partially able to fix were, my hero shooting rapidly, my dragon not taking damage and my arrows were facing in the wrong direction.
For my dragon not taking damage I have no idea why it was not taking damage still even though I managed to fix it, I had labels on the dragon listed and tagged as an enemy I know this should have worked initially as It worked on my cyclopes and the dragon and the cyclopes both have the same script on to take damage and be classified as enemies. What I did to fix this was that I just simply took out my dragon and put the dragon back into the game exactly how I did originally or at least as far as I am aware of and this seemed to have fixed my problem as my dragon now takes damage and dies.
For my character shooting rapidly I took out the part of my code which said (GetMouseButton(0)) and replaced these parts with (GetButtonDown(“Fire 1”)) which made my character no longer shoot rapidly but instead shot one arrow for every time I clicked once on my left mouse button. It however did not fix the code making me able to shoot at a faster or slower rate as to what I may end up wanting later but how it currently is it seems to be well balanced already if I am not happy with it I can always increase the speed of the projectile and damage numbers of it if it not shooting fast enough as a possible solution if I can not get it to work later on.

For my arrow firing in the wrong direction this was the easiest to fix all I had to do is go back into Photoshop, rotate the arrow to face up and then re import it and that fortunately was it.

There is still a couple more bugs which I will continue to work on and try to fix such as the one were my timing on how fast I can shoot which I mentioned before as well as fixing an invisible hit box on my dragon which only happens if I shoot at the dragon on a 45 degree angle, it still kills the dragon but it collides with it from a distance a way and I do not know why yet as my only 2d collider is not positioned in that area.

For next week I will be working on fixing some bugs for my current code as well as working on making the enemies attack the tower and if I have time I will see if I can make them destroy the tower. I will focus on cyclopes first as each of the dragon and cyclopes might need two different scripts since one fly’s and the other moves on land.