Potions, Platforms, and Enemies


Added the following:

  1. Useable Health and Mana Potions: These use an item interface for being able to be picked up, dropped, used, and an unused secondary action. They are "picked up" when the player overlaps their collision and the overlapped potion is deleted and a new one is placed in the player's hand.  The player can only pick up one at a time, since if the player picks up an item, it is set as their "held item" and the player cannot pick up any new items if they already have a set held item. The player can get rid of their held item by either using it or dropping it. Using it will delete the item from the player's hand and display text indicating that they regained health or mana. Dropping the item will remove the item from the player's hand and begin to simulate physics on the object.
  2. Falling Platforms: These platforms will change between states of being "ready", "about to fall", "falling", and "resetting" and change colors as they do so by changing the mesh's current material. It will only begin by being "ready" and will change to about to fall when the player overlaps their collision, setting it to no longer be "ready". The platform will wait some time, then change to falling by beginning to simulate physics. After falling, it will wait a bit then begin to reset by using a lerp and a timeline to move it from its saved ending and starting locations. After one more small wait, the platform will be set back to being ready.
  3. Moving Platforms: These use a lerp and a timeline to move it from its preset starting location to its ending location, it will wait between each movement cycle and use a flip flop to change between going from start to finish and reversing its path back to the start.
  4. Keys that change color: The color of the keys will change randomly over time. There are a few preset material color options that can be chosen a random key that exists will be changed. After collecting any keys, it will change to not include the collected key in its randomness.
  5. Enemies that spawn at specific locations and can be "defeated": Using enemy spawners that disappear upon play and a spawn manager to check for all the spawners, an enemy is placed at each spawner. After the player overlaps the enemy's collision they will begin to simulate physics and disappear after a few seconds. The manager will check for each enemy and when they are all removed, it will display text indicating that they will soon respawn and then respawn them all after a few seconds.

Files

Coding1_Win.zip 760 MB
56 days ago

Get Coding 1

Leave a comment

Log in with itch.io to leave a comment.