Devlog 32: Loot Enemy

PieceofPhie
2 min readOct 11, 2022

--

Today I added an additional enemy type to the spawn pool and a power up that has a chance to launch a homing missile on hit.

New Enemy — “Loot”

This enemy is docile and will not attack and can only be destroyed using a charged shot. It’ll ,’dodge’ all regular and homing shots.

(Im aware that the enemies coming from the sides shoot in the wrong direction. It’ll be fixed once I get all priorities done)

Scripting

the code is quite simple. If it is hit by anything other than an object tagged ,’Charged shot’ it’ll dodge and take not damage.

here is the code snippet

This uses the same code to boost the player.

more information on that here: https://vixian.medium.com/devlog-27-added-iframes-to-dodging-and-cooldown-ui-a8a57a3583f0

The Couroutine will increment until it reaches a maximum value (_dodgedistance) and then decrement in another coroutine. Creating the ,’Boost’ effect.

once its hit by anything tagged with ,’Charged Shot’ it’ll drop a random power up and destroy itself.

Hit with charged shot

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

PieceofPhie
PieceofPhie

Written by PieceofPhie

Unity Developer Based out of California

No responses yet

Write a response