Devlog #06 - Implementing Enemy Turret


Introduction:

As per the next plan, making it challenging for our players is quite important. Hence, we decided to add an enemy turret to do some damage over time to players and also to distract the players from the actual objective. In short, it makes it hard for the player to survive. This could make the players focus more on the game and hence bring more challenges.

Model:

Turret prototype model
 

As this is still in a developmental phase, I made a quite simple model consisting of a base that rotates and shoots bullets to different direction.

Enemy turret hierarchy
 

The muzzle base has the script programmed to rotate the base with a defined speed, to determine the firing rate of the bullet, to send the projectile script on how fast it should travel, to set the material to be applied to the projectile, and to send out the damage value to be applied. Each of those 4 muzzles has an empty child object, which is where we spawn the turret projectiles.

This script is done in TurretController.cs
 

Projectile Script:

This script is done in TurretProjectile.cs
 

This script controls the speed at which the projectile travels, stores the damage it's supposed to do, so the arena player can get the damage and apply it to their health, and destroys itself on collision.

Final Output:

Final Touches:

From the feedback of my teammates, the turret seemed to be so bulky and big and hence I decided to scale it down to a notch.

And also, the turret's projectile seems less interesting, so I made 2 new materials that could have colours that pop.

Hence, this would be our final look as of right now, We are looking forward to getting more feedback and changing accordingly.

References:

[1] Unity Object.Instantiate: https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Object.Instantiate...

[2] Unity Collider.OnTriggerEnter(Collider) : https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Collider.OnTrigger..

Leave a comment

Log in with itch.io to leave a comment.