Fast Track Checkpoint System

How to make an ordered “Fast Track” transporting menu that pulls up a list

Description

Your player can activate various checkpoints as he journeys through your world. Every time he activates a checkpoint it is added to his list of possible places to go. He can pull up this list, choose a destination and be immediately transported there.
The order of the items on the list is determined by when they were added.

Instructions

At each of your checkpoints you place a logic cube. This will be the destination for your player when he uses the fast track. You will need a mechanism for activating the checkpoint. For the benefit of this example we will use an interactable statue. Attach the cube to the statue.

In the checkpoint statue

  1. WHEN [for each of][attachments] DO [objvar:destination][=][it]
    This identifies the attached logic cube as the destination for this checkpoint
  2. WHEN [interacted] DO [global][objset:active checkpoints][increment by][objvar:destination]
    This adds the destination to the list of active checkpoints
  3. …WHEN DO [objvar:destination][numvar:list][=][global][objset:active checkpoints][count]
    This sets the position number in the list for the checkpoint, by counting how many are in the object set.
  4. …WHEN DO [boolean:active][=][true]
  5. WHEN [boolvar:active] DO
    You then add whatever effect you want to show the checkpoint has been activated, such as an effect or a light bulb going on.

Now I am going to use the name of the logic cube for display purposes. Rename the checkpoint logic cube for the name you want displayed on your list. There is a limited amount of characters, so if you find you need more characters for your checkpoint names replace every instance of [name] with [textvar:name] and add this line to each checkpoint logic cube.

WHEN [once] DO [textvar:name][=][text: The name of the checkpoint]

Create a logic cube for your menu

In its brain

  1. WHEN DO [vectorvar:pos1][y][=][0.5]
  2. WHEN DO [vectorvar:pos2][y][=][0.3]
  3. WHEN DO [vectorvar:pos3][y][=][0.1]
    This adds display vectors for each checkpoint that is available. The position will be up to you, change as required. Add one position vector for every possible checkpoint
  4. WHEN [RT][pressed] DO [toggle][boolvar:show menu]
    I have chosen a Right trigger press to activate and deactivate my menu
  5. WHEN [not][boolvar:show menu]
  6. …WHEN DO [IWP:hero][brain is active][=][true]
    This will ensure that the player brain is active if you are not showing the menu
  7. WHEN [boolvar:show menu]
  8. …WHEN [started to] DO [numvar:total checkpoints][=][global[objset:active checkpoints][count]
    This creates a number variable that matches the number of active checkpoints at the time of opening the menu
  9. …WHEN [numvar:totalcheckpoints][=][0] DO [boolvar:show menu][=][false]
    This turns the menu off if there are no active checkpoints
  10. …WHEN DO [IWP:hero][brain is active][=][false]
    This turns off the player brain while he is in the menu

This part controls the menu selection

  1. …WHEN [started to][Left stick][down direction] DO [numvar:select][increment by][1]
  2. …WHEN [numvar:select][less than][1] DO [numvar:select][=][1]
  3. …WHEN [numvar:select][greater than][numvar:totalcheckpoints] DO [numvar:select][=][1]
    Keep moving the stick down and the selection will move to position 1 again.

This part selects the checkpoint

  1. …WHEN [for each of][global][objset:active checkpoints] DO
  2. …/…WHEN [it][numvar:list][equals][1] DO [objvar:list1][=][it]
  3. …/…WHEN [it][numvar:list][equals][2] DO [objvar:list2][=][it]
  4. …/…WHEN [it][numvar:list][equals][3] DO [objvar:list3][=][it]
    you do this for all the possible number of checkpoints in your world

This part displays the list

  1. …WHEN [objvar:list1][not equal to][nothing]
  2. …/…WHEN [numvar:select][equal to][1] DO [display][objvar:list1][name][at screen position][vectorvar:pos1][black][x large font]
  3. …/…/…WHEN [else] DO [display][objvar:list1][name][at screen position][vectorvar:pos1][white][large font]
    You do this for every possible checkpoint in your world

This part transports your player

  1. …WHEN [A][pressed] DO [boolvar:transport][=][true]
  2. …/…WHEN [numvar:select][equal to][1] DO [IWP:hero][position][equals][list1][position]
  3. …/…WHEN [numvar:select][equal to][2] DO [IWP:hero][position][equals][list2][position]
    You do this for every possible checkpoint in your world
  4. …WHEN [boolvar:transport]
  5. …/…WHEN [countdown timer][2][in frames] DO [IWP:hero][brain is active][=][true]
    This turns your player brain back on
  6. …/…/…WHEN DO [boolvar:show menu][=][false]
    This hides the menu
  7. …/…/…WHEN DO [boolvar:transport][=][false]
    This resets the transporter for the next time it is accessed.

 

More info

You may wish to style the menu with a background icon, or use a camera angle to get an interesting background view. These checkpoints are activated by the player, you could use detect sensors instead of the interact to add the checkpoints to the list.

Comments are closed.

Website Powered by WordPress.com.

Up ↑

<span>%d</span> bloggers like this: