Major Project – Development 08

Introduction: In this blog post I will be making the function to kill the boss and the two different endings the player can receive.

Project Plan:

So I want the player to jump on the platform that is above the king, when that platform falls and collides with the king it will change the ending to ending 2. The two end conditions depend on whether the player kills the king or decides to spare him and go to the exit. This gives the player a choice to decide where he wants to end the story from the what they have witnessed throughout the levels.

Ending 1 = The player kills the king and murders all of the vegetables taking his place as king of the fruits

Ending 2 = The player does not kill the king and spares; creating remorse in the king and in turn harmony between the fruit and the vegetables

PlatKill:

The platkill script is attached to the platkill which is an invisible collider in the game when the player touches it it enables the rigid body gravity to true on the platform. When the collision has happened for testing purposes I debugged the function so it would print in the console that the ending has successfully changed.

Next Level 2:

Next Level Script 2:

The next level game object is set active when the player collides with the plat kill collider. The script attached to the next level 2 simple increments the build index to the correct ending scene.

BossKill:

When the platform collides with the king, it will destroy the object and print that the king has died

Next blog post:

Didn’t manage to complete the menu in this blog post but will focus on it with the rest of the UI

  • Achievement system
  • Menu
  • Ending UI

Many Thanks,
James Lacey

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started