Towers and Enemies DevLog
Towers and Enemy Scripts:
I worked on the enemy scripts first. The base script recognized the path and end point, followed the path, and died at the end. Adding an enemies script to create a list of all the enemies active at once. From there I tried to create 4 elemental enemy variants.
The variants were tricky. They lost the ability to track the path and end tiles, multiple parts of code conflicted with the existing enemy, and the damage modifier section was not functioning properly. I think I remade the script 4 times before finally getting it to run without conflicting. The damage modifier functions are going to be added later, I decided to focus on getting the core of each elemental to function.
I also created some vector icons to use for the elements.
After that I started building off of the base tower script I made with the base enemy. Again the damage modifier was causing problems, so I focused on the main functionality. Functionality of the Towers was no where near as problematic as the enemies. Though that may be because of all of the things I gathered from the enemy problems.
The towers would not track the enemies, luckily it was because neither objects had colliders nor were they set as triggers, or so I thought. The actual problem ended up being that each enemy script had a different name and wasn't simply enemy. So I added a function in the enemies script that made a public enum list of all of the possible elements. Now each enemy references that list and can retain the same naming convention.
Once the scripts were running I edited prefabs for all 5 elements for both enemies and towers. I added the icons, changed the values, and tested them. There is definately more balancing that needs to be done, but they do function properly!
[WIP] Tower Defense Game
A work in progress tower defense game.
Status | In development |
Author | Bird Brain |
Genre | Strategy |
Tags | 2D |
More posts
- Menu Updates26 days ago
- Title and Graphics38 days ago
- Health, UI, & Visual DevLog60 days ago
- Rounds & Tower Placement65 days ago
- Bullets and Waves Devlog71 days ago
Leave a comment
Log in with itch.io to leave a comment.