How to Create a Name in Your Game

by zachJohnson

<< All Articles | Print

Introduction

In this article, I will show you how to create a name in your game using variables, and links. This is quite difficult to do if you are just starting out.

1. Setting up the variables

First, we need to set up the variables. You need to make the following variables, with a min value of 0, a max value of 26, and a starting value of 0. Note: This list is assuming you want the player to enter a max of 8 letters. If you want them to enter more, then you will have to create variables up to the number of letters you want them to have.

  • DIGIT1
  • DIGIT2
  • DIGIT3
  • DIGIT4
  • DIGIT5
  • DIGIT6
  • DIGIT7
  • DIGIT8

2. Setting up the pages

Now, we set up the pages. Depending on how many digits you want the player to enter, there will have to be different amounts of pages. In this article the max letters is 8. Here is the list of pages:

 

  • Enter letter 1
  • Enter letter 2
  • Enter letter 3
  • Enter letter 4
  • Enter letter 5
  • Enter letter 6
  • Enter letter 7
  • Enter letter 8
  • Enter name [click when the player is done entering their name but don't want to enter the maximum, which in this article is 8 letters]

3. Setting up the links

On the enter letter 1 page, make 26 links. These links are from A to Z. Once you create the links, do the following:

  • Link them to the enter letter 2 page
  • Make a variable change so that the variable DIGIT1 is increased by the number that is equal to the letter you clicked on, for example: 1 for a, 2 for b, and so on. For the later digits, you use the DIGIT2 variable for the enter letter 2 page, DIGIT3 for the enter letter 3 page, and so on

On the enter letter 2 page, make a reset link, an enter name link that goes to the enter name page, and the 26 letters. Make these links on all the other pages. On each page, for each letter, make it go to the next page. For example: You are entering letter 2, make all the letter links go to the enter letter 3 page. After the player has entered their 8th letter, make it automatically enter. In other words, link the pages on enter letter 8 to the enter page rather then the next letter page, because there is no next letter. On the reset link, make it loop back to the enter letter 1 page, and reset all the variables.

4. The code

In order to display the name on a page, you must enter the following code. You should also do this on the end of every enter letter page, because then the player knows what they have written so far. Here is the code:
%%DIGIT1%=%1%A%%%%DIGIT1%=%2%B%%%%DIGIT1%=%3%C%%%%DIGIT1%=%4%D%%%%DIGIT1%=%5%E%%%%DIGIT1%=%6%F%%%%DIGIT1%=%7%G%%%%DIGIT1%=%8%H%%%%DIGIT1%=%9%I%%%%DIGIT1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DIGIT8%=%19%S%%%%DIGIT8%=%20%T%%%%DIGIT8%=%21%U%%%%DIGIT8%=%22%V%%%%DIGIT8%=%23%W%%%%DIGIT8%=%24%X%%%%DIGIT8%=%25%Y%%%%DIGIT8%=%26%Z%%

5. Ending

So you've done it! You've created a name in your game! This is a complicated process that may take a long time. Another way of doing this is to create a list of links of which name you want for example "Bob", and making a variable that keeps track of which you picked and instead of entering that massive block of text you could enter this. Note you need to change the names to the names you want.


%%NAME%=%1%Bob%%%%NAME%=%2%Marlow%%%%NAME%=%3%Jill%%%%NAME%=%4%Cassandra%%

I hope this helped and that it wasn't too confusing.