Journal Entry 5


2.6., 3.6., 18.7. - Adding a new way how to refill lives, new way how to kill and keys falling from killed enemy - 9 hours

This was really though implementing time, but it works somehow. First I made a poissons, which give hero full lives on pressing Q key. Then I made a mine, which player can place by pressing L key. This mine can explode and kill enemy. It took me a time to find out, that I need to add the damager script to the mine and add it to the enemy layer.

I wanted keys falling from an enemy, when needed and the colour of key depends on the way you kill an enemy. This was the hardest part, but then I found out, that it is easy. The enemy know what damager attacked him and damager know a tag of the game object, that killed enemy. So I tagged mine and bullet, sword stayed untagged. This way I can easilly generate a specific key by knowing just the tag and I'm placing it right, where the enemy died.

Now we have keys to open door. I made trigger in every room, so we know in which room we are. Player know how many keys he have, how many of each color, if he grabbed a new key, which was unused and what color was the last key. This way doors are just checking if player is in their room, if he already grabbed a key and if the key is same color as the door.

The last thing which is not done for this fully working is getting acid away, when the player has a key. So I will be working on that next time. I wanted to implement even buttons, but it seems like I don't have enough time for that.

Get Your Choice

Leave a comment

Log in with itch.io to leave a comment.