top of page
Search

A New Enemy Approaches

  • seanmcgarry65
  • Jan 20, 2023
  • 1 min read

This week, I made some additions to the player's inventory system, and added a system to tell the player the name of their current location, and even codded a new enemy, the moblin, into the game.



This code snippet tells the inventory to make items invisible if the player doesn't actually have them yet...

...And this one does the opposite, making inventory items that the player has collected visible.


This line of code sets a new part of the UI to display the name of the current area that the player is in. Moving into a new area automatically changes the name displayed, so that the player always knows where they are. (Or at least knows what the area they're lost in is called)


The new enemy, the moblin, shares many aspects of its code with the octorok, including its movement and attack code. It is distinguished in that the sprites for both itself and its attack are visually distinct, and mechanically tougher and more damaging than the octorok.


Since the moblin uses the same movement code as the octorok, it needs additional coding to keep it upright, since unlike the octorok, the moblin walks on two legs. Since both sprites are rotated in the direction of movement, this means animations must be made to make it -look- like the moblin is still right-side-up.


You can play the game here:





 
 
 

Recent Posts

See All

Comments


bottom of page