The Endless Mission Wiki
Before following this tutorial module, make sure that you are:
  • Either starting with "Barebones Game" Loaded into the Editor,
  • Or starting from your saved copy of your Game that you used while following the other modules of this tutorial.

Initial Preparation[]

  1. First, in your Project Hierarchy, find "Gameplay/Win Trigger" and Right-click to delete it. This is the old trigger that governs the win condition of the game that you started with. We'll be recreating the Win Trigger that the "Barebones Game" uses by default (collecting the Golden Pineapple) from the ground up. Yes, this means if you started with the "Barebones Game" for this tutorial, you just deleted the exact same thing we'll ultimately be making. Don't think about it too hard... The point is, we need to delete this Asset from our Project Hierarchy so it doesn't conflict with our new work.
  2. Right-click on the Gameplay entity in your Project Hierarchy and select "Create Empty" from the dropdown that appears, rename to “Win Pineapple”. Search for “Trigger” in the Library, and drag and drop the “TriggerVolume” Script onto the “Win Pineapple” entity you just made.

Setting Up The Pickup's Visuals[]

  1. Search for "pineapple" in the Library.
  2. From the Library, drag "Golden Pineapple Visuals" to your existing "Win Pineapple" in the Project Hierarchy. This will make the visuals a child of the trigger.
  3. With "Golden Pineapple Visuals" still selected, make sure its Properties Panel is visible:
  4. Numerically set Rotation X to -90.
  5. Numerically set Scale to 0.2, 0.2, 0.2.
  6. Now, in your Viewport, move "Win Pineapple" and nudge its position so that it sits nicely on the rooftop. Both the Pineapple and the Trigger Volume should move together.

Final Pickup Configuration[]

  1. Make sure "Win Pineapple" is selected and its Properties Panel is visible.
  2. In the Properties, click the "+" on the "Trigger Enter" field to expand it and make "Target" field visible.
  3. Then, from your Project Hierarchy: Drag "Gameplay/ GameplayLogic" to the "Target" field of "Win Pineapple".
  4. Finally, click on the "No Function" drop down right under it, and select "PlayerWon()". This will make it so that when you touch the pickup, you will win the game.
  5. Now is a good time to press Play and test everything.
  6. Make sure your Avatar is positioned in a good starting place, and the Tower is also in a good position for gameplay.
  7. Congratulations! You have completed this tutorial and now have the knowledge to create a simple Game.